Skip to content

Commit

Permalink
Revert UnitOfWorkInfo (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
truongtphat authored Nov 1, 2024
1 parent a1e5049 commit 80cf2c0
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/mix.heart/UnitOfWork/UnitOfWorkInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ public void Complete()
ActiveTransaction.Commit();

ActiveTransaction.Dispose();
ActiveDbContext.Dispose();

ActiveTransaction = null;
ActiveDbContext = null;
}
}

Expand All @@ -67,10 +65,8 @@ public void Rollback()
ActiveTransaction.Rollback();

ActiveTransaction.Dispose();
ActiveDbContext.Dispose();

ActiveTransaction = null;
ActiveDbContext = null;
}
}

Expand All @@ -82,10 +78,8 @@ public async Task CompleteAsync(CancellationToken cancellationToken = default)
await ActiveTransaction.CommitAsync(cancellationToken);

await ActiveTransaction.DisposeAsync();
await ActiveDbContext.DisposeAsync();

ActiveTransaction = null;
ActiveDbContext = null;
}
}

Expand All @@ -96,10 +90,8 @@ public async Task RollbackAsync(CancellationToken cancellationToken = default)
await ActiveTransaction.RollbackAsync(cancellationToken);

await ActiveTransaction.DisposeAsync();
await ActiveDbContext.DisposeAsync();

ActiveTransaction = null;
ActiveDbContext = null;
}
}

Expand Down

0 comments on commit 80cf2c0

Please sign in to comment.