using NHibernate; using NHibernate.Engine; ISessionFactoryImplementor sessionFactory = new Configuration().Configure().BuildSessionFactory() as ISessionFactoryImplementor;
using NHibernate; using NHibernate.Engine; ISessionFactoryImplementor sessionFactory = new Configuration().Configure().BuildSessionFactory() as ISessionFactoryImplementor; ISessionContext sessionContext = sessionFactory.GetSessionContext();In this example, the current session context is retrieved from the session factory using the GetSessionContext method. Package library: NHibernate.