public JsonResult ListJson() { SchoolsServices mongo = new SchoolsServices("school", "school", "mongodb://localhost:27017/"); var schools = mongo.getAll(); return(Json(schools)); }
public IActionResult List() { SchoolsServices mongo = new SchoolsServices("school", "school", "mongodb://localhost:27017/"); var schools = mongo.getAll(); return(View("List", schools)); }
public IActionResult Create(SchoolModel school) { if (school != null) { SchoolsServices mongo = new SchoolsServices("school", "school", "mongodb://localhost:27017/"); mongo.create(school); } return(View()); }