Пример #1
0
        public RestaurantsService(ITreatDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _restaurants = database.GetCollection <Restaurants>(settings.RestaurantsCollectionName);
        }
Пример #2
0
        public UserService(ITreatDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _users = database.GetCollection <User>(settings.UsersCollectionName);
        }
Пример #3
0
        public LoginService(ITreatDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _login = database.GetCollection <Login>(settings.LoginCollectionName);
        }
Пример #4
0
        public TreatService(ITreatDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _treat = database.GetCollection <Treat>(settings.TreatCollectionName);
        }