예제 #1
0
        public GamesService(IGameDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _games = database.GetCollection <Game>(settings.GamesCollectionName);
        }
예제 #2
0
        public GameService(IGameDatabaseSettings settings, IMongoClient client)
        {
            IMongoDatabase?database = client.GetDatabase(settings.DatabaseName);

            games = database.GetCollection <Game>(settings.GamesCollectionName);
        }
        public BoardService(IGameDatabaseSettings settings, IMongoClient client)
        {
            IMongoDatabase?database = client.GetDatabase(settings.DatabaseName);

            boards = database.GetCollection <Board>(settings.BoardsCollectionName);
        }
예제 #4
0
        public SessionService(IGameDatabaseSettings settings, IMongoClient client)
        {
            IMongoDatabase?database = client.GetDatabase(settings.DatabaseName);

            sessions = database.GetCollection <Session>(settings.SessionsCollectionName);
        }
        public InvitationService(IGameDatabaseSettings settings, IMongoClient client)
        {
            IMongoDatabase database = client.GetDatabase(settings.DatabaseName);

            invitations = database.GetCollection <Invitation>(settings.InvitationsCollectionName);
        }