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