Browse Source

fix DotNetCore.CAP.PostgreSql.CapEFDbTransaction RollbackAsync Method. (#640)

master
谷草` 4 years ago
committed by GitHub
parent
commit
d63fedccda
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/DotNetCore.CAP.PostgreSql/IDbContextTransaction.CAP.cs

+ 2
- 2
src/DotNetCore.CAP.PostgreSql/IDbContextTransaction.CAP.cs View File

@@ -16,7 +16,7 @@ namespace Microsoft.EntityFrameworkCore.Storage
public CapEFDbTransaction(ICapTransaction transaction) public CapEFDbTransaction(ICapTransaction transaction)
{ {
_transaction = transaction; _transaction = transaction;
var dbContextTransaction = (IDbContextTransaction) _transaction.DbTransaction;
var dbContextTransaction = (IDbContextTransaction)_transaction.DbTransaction;
TransactionId = dbContextTransaction.TransactionId; TransactionId = dbContextTransaction.TransactionId;
} }


@@ -42,7 +42,7 @@ namespace Microsoft.EntityFrameworkCore.Storage


public Task RollbackAsync(CancellationToken cancellationToken = default) public Task RollbackAsync(CancellationToken cancellationToken = default)
{ {
return _transaction.CommitAsync(cancellationToken);
return _transaction.RollbackAsync(cancellationToken);
} }


public Guid TransactionId { get; } public Guid TransactionId { get; }


Loading…
Cancel
Save