Why do many nHibernate example code instances contain Castle dll?

I see files such as Castle.DynamicProxy.dll or Castle.Core.dll or Castle.Model.dll and others, similar to projects that should be simple, introducing noob to nHibernate. What does this lock material have to do with nHibernate? Does this unacceptable erosion of water by textbook authors or nHibernate really require these kinds of extra hoops that jump just to make the basics work?

+3
source share
1 answer

NHibernate uses proxy objects to achieve lazy loading and uses the Castle DynamicProxy module . It is for this reason that your object properties must be virtual. Because NHibernate creates proxy classes that intercept calls to your properties.

+7
source

Source: https://habr.com/ru/post/1795138/


All Articles