本文介绍了NHibernate拦截器 - 它是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是NHibernate拦截器,它在应用程序中提供什么目的?

What is NHibernate Interceptor, and what purpose does it serve in an application?

此外,

关于使您的应用程序变慢:
我建议您只看看优化启动时间,当它真的成为一个问题。

About making your app slower:I'd suggest that you only have a look at optimizing start-up time, when it really becomes a problem.

当你构建一个会话工厂时,NHibernate会解析所有的映射,这是一个有点贵的操作。但是,只要你的实体数量有限,性能影响不大。

我从来没有必要优化NHibernate的初始化,因为启动时间很慢。

When you build a session-factory, NHibernate will parse all the mappings, and that is an operation that is a bit expensive. But, as long as you have a limited number of entities, the performance hit isn't that big.
I have never ever had to optimize the initialization of NHibernate, because of slow startup times.

我建议您首先专注于您的应用程序的核心 - 您要解决的问题 - 然后看看如何可以改善启动性能。
(如果你必须这样做)。

I'd suggest that you first concentrate on the core of your application -the problem you're trying to solve- and afterwards have a look on how you could improve startup performance.(If you'll ever have to do it).

这篇关于NHibernate拦截器 - 它是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 08:33