Exemple #1
0
 public DatabaseProvider(IContainer container, MongoDbClassMapper mapper)
 {
     MongoDefaults.MaxConnectionIdleTime = TimeSpan.FromMinutes(1);
     _container        = container;
     _client           = new Lazy <IMongoClient>(CreateMongoClient);
     _connectionString = GetConnectionString();
     _databaseName     = GetDatabaseName(_connectionString);
     mapper.Register();
 }
Exemple #2
0
 public void TestSetUp()
 {
     Mapper = new MongoDbClassMapper();
     Mapper.Register();
 }