public ActionResult GetAll() { DoctorService d = new DoctorService(); var res = d.GetAllDoctor(); return(Json(res)); }
// GET: Doctor public ActionResult Index() { using (MyContext ctx = new MyContext()) { DoctorService d = new DoctorService(); var res = d.GetAllDoctor(); return(View(res)); } }