What does NHibernateUtil.Initialize do?

浪子不回头ぞ 提交于 2020-01-01 08:13:20

问题


I have inherited a piece of code which calls NHibernateUtil.Initialize.

I am relatively new to NHibernate and have not been able to work out specifically what calling NHibernateUtil.Initialize does.

What does it do and in what scenarios should it be called ?


回答1:


Basicaly it will eagerly load the domain objects that are lazily loaded or proxied by nhibernate.

Have a look at this from the NHibernate website - lazy-loading-eager-loading the reference is in the bottom quarter of the article.



来源:https://stackoverflow.com/questions/3295976/what-does-nhibernateutil-initialize-do

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!