Esempio n. 1
0
        public UserService(IEventBookingDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _users = database.GetCollection <User>(settings.UserCollection);
        }
Esempio n. 2
0
        public EventService(IEventBookingDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _events  = database.GetCollection <Event>(settings.EventCollection);
            _booking = database.GetCollection <Booking>(settings.BookingCollection);
        }