public GamesService(IGameDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _games = database.GetCollection <Game>(settings.GamesCollectionName); }
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); }
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); }