private void DisposeTransaction() { if (_transaction != null) { _transaction.Dispose(); } _transaction = null; }
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."); } }
public void SetInnerTransaction(TracingDbTransaction transaction) { _command.Transaction = transaction == null ? null : transaction.WrappedInstance; }