2025-03-15 01:39:43 +03:30

14 lines
347 B
C#

namespace BuildingBlocks.Mongo;
public interface IUnitOfWork : IDisposable
{
Task BeginTransactionAsync(CancellationToken cancellationToken = default);
Task CommitAsync(CancellationToken cancellationToken = default);
}
public interface IUnitOfWork<out TContext> : IUnitOfWork
where TContext : class
{
TContext Context { get; }
}