public async Task CompleteTransactionAsync() { if (DBTransaction == null) { throw new Exception("Transaction 对象不存在"); } await DBTransaction.CommitAsync(); await DBTransaction.DisposeAsync(); DBTransaction = null; }
public async Task AbortTransactionAsync() { if (DBTransaction == null) { throw new Exception("Transaction 对象不存在"); } await DBTransaction.RollbackAsync(); await DBTransaction.DisposeAsync(); DBTransaction = null; }