public Repository(IAggregateStoreFactory[] aggregateStoreFactories, IUnitOfWorkAccessor unitOfWorkAccessor) { this.aggregateStoreFactories = aggregateStoreFactories; unitOfWork = unitOfWorkAccessor.UnitOfWork; if (unitOfWork != null) { unitOfWork.AddInnerTransaction(new RepositoryTransaction(this)); } }
public SagaRepository(ICommandBus commandBus, IRepository repository, ISagaMetadataRepository metadataRepository, IEntityTypeManager entityTypeManager, IUnitOfWork unitOfWork) { this.commandBus = commandBus; this.repository = repository; this.entityTypeManager = entityTypeManager; MetadataRepository = metadataRepository; unitOfWork.AddInnerTransaction(new SagaRepositoryTransaction(this)); }
public Repository(IAggregateStoreFactory[] aggregateStoreFactories, IUnitOfWork unitOfWork) { this.aggregateStoreFactories = aggregateStoreFactories; this.unitOfWork = unitOfWork; unitOfWork.AddInnerTransaction(new RepositoryTransaction(this)); }
public void OnWorkBegin(IUnitOfWork unitOfWork) { unitOfWork.AddInnerTransaction(this); }