public UsersService(IUsersDatabaseSettings settings, MatchesService matchesService)
        {
            _client   = new MongoClient(settings.ConnectionString);
            _database = _client.GetDatabase(settings.DatabaseName);


            _users = _database.GetCollection <User>(settings.DatabaseCollectionName);
        }
Example #2
0
        public TicketsService(ITicketsDatabaseSettings settings, MatchesService matchesService, UsersService usersService)
        {
            _client   = new MongoClient(settings.ConnectionString);
            _database = _client.GetDatabase(settings.DatabaseName);


            _tickets        = _database.GetCollection <Ticket>(settings.DatabaseCollectionName);
            _settings       = settings;
            _matchesService = matchesService;
            _usersService   = usersService;
        }