public static void ResetSession()
        {
            var builder = new HybridSessionBuilder();
            //builder.GetSession().Dispose();

            ISession currentSession = CurrentSessionContext.Unbind(builder.GetSessionFactory());

            if (currentSession == null) return;

            currentSession.Close();
            currentSession.Dispose();
        }
Ejemplo n.º 2
0
        public static void ResetSession()
        {
            var builder = new HybridSessionBuilder();
            //builder.GetSession().Dispose();

            ISession currentSession = CurrentSessionContext.Unbind(builder.GetSessionFactory());

            if (currentSession == null)
            {
                return;
            }

            currentSession.Close();
            currentSession.Dispose();
        }