Пример #1
0
 public static ISession OpenSession()
 {
     if (_openSession == null)
     {
         _openSession = SessionFactory.OpenSession();
         ModifiedEventListener ModifiedListener = new ModifiedEventListener();
         _openSession.GetSessionImplementation().Listeners.SaveEventListeners = new
                                                                                NHibernate.Event.ISaveOrUpdateEventListener[] { ModifiedListener };
     }
     return(_openSession);
 }
Пример #2
0
 public static ISession OpenSession()
 {
     if (_openSession == null)
     {
         _openSession = SessionFactory.OpenSession();
         ModifiedEventListener ModifiedListener = new ModifiedEventListener();
         _openSession.GetSessionImplementation().Listeners.SaveEventListeners = new
             NHibernate.Event.ISaveOrUpdateEventListener[] { ModifiedListener};
     }
     return _openSession;
 }