public MongoUsersManager(IOptions <AppSettings> appSettings, ImdbDatabaseSettings settings) { _appSettings = appSettings.Value; var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _users = database.GetCollection <UserModel>(settings.UsersCollectionName); }
public MongoMoviesExtendManager(IOptions <AppSettings> appSettings, ImdbDatabaseSettings settings) { _appSettings = appSettings.Value; var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _movies = database.GetCollection <MovieExtendModel>(settings.MoviesCollectionName); }