Exemplo n.º 1
0
        public MongoDbSagaRepository(IMongoDatabase database, ICollectionNameFormatter collectionNameFormatter)
        {
            var mongoDbSagaConsumeContextFactory = new MongoDbSagaConsumeContextFactory <TSaga>();

            _repositoryContextFactory =
                new MongoDbSagaRepositoryContextFactory <TSaga>(database.GetCollection <TSaga>(collectionNameFormatter), mongoDbSagaConsumeContextFactory);
            _repository = new SagaRepository <TSaga>(_repositoryContextFactory);
        }
Exemplo n.º 2
0
 public SagaRepository(ISagaRepositoryContextFactory <TSaga> repositoryContextFactory)
 {
     _repositoryContextFactory = repositoryContextFactory;
 }