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