public void Initialize() { should_not_currently_be_disposed(); CurrentSession = _nHibernateSessionFactory.CreateSession(); begin_new_transaction(); _isInitialized = true; }
public void Start() { AssertIsNotDisposed(); AssertIsNotStarted(); _currentSession = _sessionFactory.CreateSession(); StartNewTransaction(); IsStarted = true; }
public ISession OpenSession() { if (Current != null) { throw new InvalidOperationException("There is already an active ISession instance for this thread"); } var cur = _sessionFactory.CreateSession(); cur.FlushMode = FlushMode.Never; //readonly by default Current = cur; return(cur); }
public DbConversation(INHibernateSessionFactory sessionFactory) { _session = sessionFactory.CreateSession(); }