public MatchesService(IMatchesDatabaseSettings settings, TeamsService teamService)
        {
            _client   = new MongoClient(settings.ConnectionString);
            _database = _client.GetDatabase(settings.DatabaseName);


            _matches     = _database.GetCollection <Match>(settings.DatabaseCollectionName);
            _teamService = teamService;
        }
Beispiel #2
0
 /* Exporting the Database Object for the FetchDBRefAs to use it in the CreditCard Controller */
 public IMongoDatabase GetDatabase(IMatchesDatabaseSettings settings) =>
 _client.GetDatabase(settings.DatabaseName);