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

            _users = database.GetCollection <User>(settings.UsersCollectionName);
        }
Exemplo n.º 2
0
        public PlaceService(IJourniDatabaseSettings settings, DayService dayService, UserService userService)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _users = database.GetCollection <User>(settings.UsersCollectionName);

            _dayService  = dayService;
            _userService = userService;
        }