From d63fedccdaade3ec1cebc92a5a542764aa112c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=B7=E8=8D=89=60?= Date: Thu, 27 Aug 2020 15:20:50 +0800 Subject: [PATCH] fix DotNetCore.CAP.PostgreSql.CapEFDbTransaction RollbackAsync Method. (#640) --- src/DotNetCore.CAP.PostgreSql/IDbContextTransaction.CAP.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DotNetCore.CAP.PostgreSql/IDbContextTransaction.CAP.cs b/src/DotNetCore.CAP.PostgreSql/IDbContextTransaction.CAP.cs index ac5f87d..8bd7619 100644 --- a/src/DotNetCore.CAP.PostgreSql/IDbContextTransaction.CAP.cs +++ b/src/DotNetCore.CAP.PostgreSql/IDbContextTransaction.CAP.cs @@ -16,7 +16,7 @@ namespace Microsoft.EntityFrameworkCore.Storage public CapEFDbTransaction(ICapTransaction transaction) { _transaction = transaction; - var dbContextTransaction = (IDbContextTransaction) _transaction.DbTransaction; + var dbContextTransaction = (IDbContextTransaction)_transaction.DbTransaction; TransactionId = dbContextTransaction.TransactionId; } @@ -42,7 +42,7 @@ namespace Microsoft.EntityFrameworkCore.Storage public Task RollbackAsync(CancellationToken cancellationToken = default) { - return _transaction.CommitAsync(cancellationToken); + return _transaction.RollbackAsync(cancellationToken); } public Guid TransactionId { get; }