예제 #1
0
        public Repository(IAggregateStoreFactory[] aggregateStoreFactories, IUnitOfWorkAccessor unitOfWorkAccessor)
        {
            this.aggregateStoreFactories = aggregateStoreFactories;
            unitOfWork = unitOfWorkAccessor.UnitOfWork;

            if (unitOfWork != null)
            {
                unitOfWork.AddInnerTransaction(new RepositoryTransaction(this));
            }
        }
예제 #2
0
        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));
        }
예제 #3
0
 public Repository(IAggregateStoreFactory[] aggregateStoreFactories, IUnitOfWork unitOfWork)
 {
     this.aggregateStoreFactories = aggregateStoreFactories;
     this.unitOfWork = unitOfWork;
     unitOfWork.AddInnerTransaction(new RepositoryTransaction(this));
 }
예제 #4
0
 public void OnWorkBegin(IUnitOfWork unitOfWork)
 {
     unitOfWork.AddInnerTransaction(this);
 }