Esempio n. 1
0
        private void DisposeTransaction()
        {
            if (_transaction == null)
            {
                return;
            }

            _transaction.Dispose();
            _transaction = null;
        }
Esempio n. 2
0
		public ITransaction BeginTransaction(IsolationLevel isolationLevel)
		{
			if (_transaction != null)
				throw new InvalidOperationException("A transaction is already in progress and a new one cannot be started.");

			_transaction = new NHibernateTransaction(_session.BeginTransaction(isolationLevel),
				committed => DisposeTransaction(),
				aborted => DisposeTransaction());

			return _transaction;
		}
Esempio n. 3
0
        public ITransaction BeginTransaction(IsolationLevel isolationLevel)
        {
            if (_transaction != null)
            {
                throw new InvalidOperationException("A transaction is already in progress and a new one cannot be started.");
            }

            _transaction = new NHibernateTransaction(_session.BeginTransaction(isolationLevel),
                                                     committed => DisposeTransaction(),
                                                     aborted => DisposeTransaction());

            return(_transaction);
        }
Esempio n. 4
0
		private void DisposeTransaction()
		{
			if (_transaction == null) return;

			_transaction.Dispose();
			_transaction = null;
		}