コード例 #1
0
        public UserService(ICafeMoenenDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _users = database.GetCollection <User>(settings.UsersCollectionName);
        }
コード例 #2
0
        public ReservationService(ICafeMoenenDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _reservations = database.GetCollection <Reservation>(settings.ReservationsCollectionName);
        }
コード例 #3
0
        public TableService(ICafeMoenenDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _tables = database.GetCollection <Table>(settings.TablesCollectionName);
        }