Exemplo n.º 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();
 }
 public void TestSetUp()
 {
     Mapper = new MongoDbClassMapper();
     Mapper.Register();
 }