public MongoDbContext(IMongoSessionProvider sessionProvider, IOptions <EventLogMongoDbOptions> eventLogMongoDbOptions) { _mongoSession = sessionProvider.MongoSession; _mongoDbOptions = eventLogMongoDbOptions.Value; EventLogsCollection = _mongoSession.Client.GetDatabase(_mongoDbOptions.DatabaseName).GetCollection <EventLog>(_mongoDbOptions.CollectionName); }
public MongoPersistentEventTransaction(IMongoSessionProvider mongoSessionProvider, MongoDbContext mongoDbContext) { _mongoSessionProvider = mongoSessionProvider; _mongoDbContext = mongoDbContext; }