The .NET ISupportInitialize interface is used when we want to support staged initialization for objects. Its BeginInit method is called when initialization is about to start and EndInit when it is finished.
If we want, it is easy to add support for it in NHibernate. An option would be:
We do this by using a custom interceptor, like we have in the past. We start by writing a class that inherits from EmptyInterceptor, and implements the listener interface for the PostLoad event, IPostLoadEventListener:Then, before creating a session factory, we need to register it in the Configuration instance: Now, if your entity implements ISupportInitialize, NHibernate will automagically call its methods at the proper time. As simple as this!