Beispiel #1
0
 private void TearDownContextualSession()
 {
     if (SessionFactoryProvider.HasContextualSessions())
     {
         var session = CurrentSessionContext.Unbind(SessionFactory);
         session.Close();
     }
 }
Beispiel #2
0
 private void SetupContextualSession()
 {
     if (SessionFactoryProvider.HasContextualSessions())
     {
         var session = SessionFactory.OpenSession();
         CurrentSessionContext.Bind(session);
     }
 }