mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-12 03:12:11 +08:00
19 lines
744 B
C#
19 lines
744 B
C#
using BuildingBlocks.Core.Event;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace BuildingBlocks.EFCore;
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage;
|
|
|
|
public interface IDbContext
|
|
{
|
|
DbSet<TEntity> Set<TEntity>() where TEntity : class;
|
|
IReadOnlyList<IDomainEvent> GetDomainEvents();
|
|
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
|
|
Task BeginTransactionAsync(CancellationToken cancellationToken = default);
|
|
Task CommitTransactionAsync(CancellationToken cancellationToken = default);
|
|
Task RollbackTransactionAsync(CancellationToken cancellationToken = default);
|
|
IExecutionStrategy CreateExecutionStrategy();
|
|
Task ExecuteTransactionalAsync(CancellationToken cancellationToken = default);
|
|
}
|