Skip to content

Commit

Permalink
Order Context refactoring (#449)
Browse files Browse the repository at this point in the history
HasActiveTransaction used in possible sections
  • Loading branch information
onurkanbakirci authored Jul 17, 2024
1 parent dc44b1e commit 246c722
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Ordering.Infrastructure/OrderingContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public async Task CommitTransactionAsync(IDbContextTransaction transaction)
}
finally
{
if (_currentTransaction != null)
if (HasActiveTransaction)
{
_currentTransaction.Dispose();
_currentTransaction = null;
Expand All @@ -103,7 +103,7 @@ public void RollbackTransaction()
}
finally
{
if (_currentTransaction != null)
if (HasActiveTransaction)
{
_currentTransaction.Dispose();
_currentTransaction = null;
Expand Down

0 comments on commit 246c722

Please sign in to comment.