예제 #1
0
        public ActionResult huntGames()
        {
            var mongoClient = new MongoClient("Server=localhost:27017");
            var mongoServer = mongoClient.GetServer();
            var db          = mongoServer.GetDatabase("hntsprt");
            MongoCollection <BsonDocument> products = db.GetCollection <BsonDocument>("gamedets");
            hntgModal hm = new hntgModal();

            hm.games = products;
            return(View(hm));
        }
예제 #2
0
        public ActionResult manageGame()
        {
            var mongoClient = new MongoClient("Server=localhost:27017");
            var mongoServer = mongoClient.GetServer();
            var db          = mongoServer.GetDatabase("hntsprt");
            MongoCollection <BsonDocument> games = db.GetCollection <BsonDocument>("gamedets");
            MongoCollection <BsonDocument> teams = db.GetCollection <BsonDocument>("regdets");
            hntgModal hm = new hntgModal();

            hm.games = games;
            hm.teams = teams;
            return(View(hm));
        }