Class ProjectionsUnitOfWork<TDbContext>
- Assembly
- Stratara.EventSourcing.EntityFrameworkCore.dll
Read-side unit of work for projection writers — extends ReadUnitOfWork<TDbContext> with factory methods for projection-specific repositories such as ITenantRepository.
public class ProjectionsUnitOfWork<TDbContext> : ReadUnitOfWork<TDbContext>, IProjectionsUnitOfWork, IReadUnitOfWork, IUnitOfWork where TDbContext : DbContext, IReadDbContext
Type Parameters
TDbContextThe concrete read-store DbContext type.
- Inheritance
-
UnitOfWork<TDbContext>ReadUnitOfWork<TDbContext>ProjectionsUnitOfWork<TDbContext>
- Implements
- Inherited Members
- Extension Methods
Constructors
ProjectionsUnitOfWork(IDbContextFactory<TDbContext>)
Read-side unit of work for projection writers — extends ReadUnitOfWork<TDbContext> with factory methods for projection-specific repositories such as ITenantRepository.
public ProjectionsUnitOfWork(IDbContextFactory<TDbContext> contextFactory)
Parameters
contextFactoryIDbContextFactory<TDbContext>Factory used to create a new DbContext per transaction.
Methods
CreateTenantRepository(ITransaction)
Creates an ITenantRepository bound to the supplied read transaction.
public ITenantRepository CreateTenantRepository(ITransaction transaction)
Parameters
transactionITransactionAn active read transaction obtained from StartAsync(CancellationToken).