public void Rollback() { _count--; if (_count == 0) { Transaction.Rollback(); DbTransactionContext.RemoveTransaction(DataBase); if (!DbTransactionContext.HasTransaction(DataBase) && Connection != null) { CloseConnection(Connection); } } }
public void Commit() { _count--; if (_count == 0) { Transaction.Commit(); DbTransactionContext.RemoveTransaction(DataBase); if (!DbTransactionContext.HasTransaction(DataBase) && Connection != null) { Connection.Close(); } } }