Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does NHibernateUtil.Initialize do?

Tags:

nhibernate

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 ?

like image 768
Adrian Russell Avatar asked Jul 21 '10 02:07

Adrian Russell


1 Answers

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.

like image 191
Nathan Fisher Avatar answered Oct 26 '22 22:10

Nathan Fisher