public MongoDbRepositoryBase(IMongoDbSetting settings) { IMongoDatabase database = new MongoClient(settings.ConnectionString).GetDatabase(settings.DatabaseName); _collection = database.GetCollection <T>(GetCollectionName(typeof(T))); }
public UserRepository(IMongoDbSetting mongoDbSetting) { _mongoDbSetting = mongoDbSetting; }
public DbFactory(IMongoDbSetting mongoDbSetting) { _mongoDbSetting = mongoDbSetting; }
public MongoRepository(IMongoDbSetting settings) { var database = new MongoClient(settings.ConnectionString).GetDatabase(settings.DatabaseName); _collection = database.GetCollection <TDocument>(GetCollectionName(typeof(TDocument))); }