コード例 #1
0
 public MongoDBRepository(MongoDBClient client)
 {
     _database        = client.GetDatabase("unity");
     _scores          = _database.GetCollection <ScoreEntry>("scores");
     _players         = _database.GetCollection <Player>("players");
     _maxScoreEntries = 5000;
 }
コード例 #2
0
        public MongoDbRepository(MongoDBClient client)
        {
            //Getting the database with name "game2"
            IMongoDatabase database = client.GetDatabase("game");

            //Getting collection with name "players"
            _collection = database.GetCollection <Player>("players");
        }
コード例 #3
0
        public MongoDbRepository(MongoDBClient client)
        {
            //Getting the database with name "game"
            IMongoDatabase database = client.GetDatabase("game");

            //Getting collection with name "highscores"
            _collection = database.GetCollection <HighScore>("highscores");
        }
コード例 #4
0
        public MongoDbRepository(MongoDBClient client)
        {
            IMongoDatabase database = client.GetDatabase("gameapi");

            _collection = database.GetCollection <Player>("players");
        }
コード例 #5
0
 public MongoDBRepository(MongoDBClient client)
 {
     _database   = client.GetDatabase("game");
     _collection = _database.GetCollection <Player>("players");
 }