public object GetTeacherModal(string id) { var teacher = new TeacherVm(dispatcher.Query(new GetEntitiesQuery<Teacher>()).First(r => r.Id == id)); return PartialView("_TeacherModalContent", teacher); }
public ActionResult EditTeacherModal(string id = "0") { if (id == "0") return View("Teachers/_EditTeacherModal"); var teacherVm = new TeacherVm(dispatcher.Query(new GetEntitiesQuery<Teacher>()).First(r => r.Id == id)); return View("Teachers/_EditTeacherModal", teacherVm); }