We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73ca9b8 commit c521599Copy full SHA for c521599
src/Wax.Core/Repositories/IUnitOfWork.cs
@@ -1,6 +1,6 @@
1
namespace Wax.Core.Repositories;
2
3
-public interface IUnitOfWork
+public interface IUnitOfWork : IDisposable
4
{
5
public ICustomerRepository Customers { get; }
6
Task SaveChangesAsync(CancellationToken cancellationToken = default);
src/Wax.Core/Repositories/UnitOfWork.cs
@@ -20,4 +20,9 @@ public Task SaveChangesAsync(CancellationToken cancellationToken = default)
20
21
return _context.SaveChangesAsync(cancellationToken);
22
}
23
+
24
+ public void Dispose()
25
+ {
26
+ _context?.Dispose();
27
+ }
28
0 commit comments