Ejemplo n.º 1
0
        private void DisposeTransaction()
        {
            if (_transaction != null)
            {
                _transaction.Dispose();
            }

            _transaction = null;
        }
Ejemplo n.º 2
0
        public override void BeginTransaction()
        {
            CheckDisposed();

            Connect();

            if (_transaction != null)
            {
                throw new InvalidOperationException("Cannot call BeginTransaction when a transaction is already in progress.");
            }

            try
            {
                _transaction = _connection.BeginTransaction(IsolationLevel);
            }
            catch (Exception e)
            {
                throw CreateRdbmsProviderException(e, "Error while executing BeginTransaction.");
            }
        }
Ejemplo n.º 3
0
 public void SetInnerTransaction(TracingDbTransaction transaction)
 {
     _command.Transaction = transaction == null ? null : transaction.WrappedInstance;
 }