예제 #1
0
        public IActionResult List()
        {
            SubjectsServices mongo = new SubjectsServices("school", "subjects", "mongodb://localhost:27017/");
            var subjects           = mongo.getAll();

            return(View("List", subjects));
        }
예제 #2
0
        public JsonResult ListJson()
        {
            SubjectsServices mongo = new SubjectsServices("school", "subjects", "mongodb://localhost:27017/");

            return(Json(mongo.getAll()));
        }