public override void Rollback() { if (_transaction != null) { _transaction.Rollback(); } if (_currentState == ConnectionState.Open) { Close(); } }
public void RollbackTransaction() { if (_transaction != null) { try { _transaction.Rollback(); } catch (Exception) { // TODO: We need to handle this situation. Maybe just write a log entry or something. throw; } } else { throw new InvalidOperationException("You must call BeginTransaction before calling RollbackTransaction."); } }