public UsersService(IUsersDatabaseSettings settings, MatchesService matchesService) { _client = new MongoClient(settings.ConnectionString); _database = _client.GetDatabase(settings.DatabaseName); _users = _database.GetCollection <User>(settings.DatabaseCollectionName); }
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; }