public ActionResult DeleteDoctor(int id) { DoctorDTO doctor = doctorService.GetDoctors().FirstOrDefault(doctorId => doctorId.DoctorId == id); if (doctor != null) { return(View(MapperUtilVM.MapToDoctorVM(doctor))); } else { ViewBag.Title = "Ошибка удаления врача."; ViewBag.Message = "Не удалось найти врача для удаления с идентификационным номером = " + id; return(View("Error")); } }
public ActionResult EditDoctor(int id) { return(View(MapperUtilVM.MapToDoctorVM(doctorService.GetDoctors().FirstOrDefault(doctorID => doctorID.DoctorId == id)))); }