2023-01-23 15:36:08 +03:30

13 lines
407 B
C#

using BuildingBlocks.Core.Event;
using Microsoft.EntityFrameworkCore;
namespace BuildingBlocks.EFCore;
public interface IDbContext
{
DbSet<TEntity> Set<TEntity>() where TEntity : class;
IReadOnlyList<IDomainEvent> GetDomainEvents();
Task ExecuteTransactionalAsync(CancellationToken cancellationToken = default);
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}