public ActionResult Update([FromBody] DoKhan c) { try { if (ModelState.IsValid) { dokhanRepo.Update(c); return(Json(c)); } } catch (Exception ex) { ModelState.AddModelError(string.Empty, ex.Message); } return(View(c)); }
public ActionResult Edit(int id) { DoKhan dokhan = dokhanRepo.GetById(id); return(Json(dokhan)); }