// GET: Doctor/Details/5 public ActionResult Details(int id) { try { Doctor doctor = doctorBusiness.GetById(id); if (doctor == null) { return(HttpNotFound()); } return(View(DoctorModel.ToModel(doctor))); } catch (Exception ex) { Log.Error(ex.Message, ex); return(View()); } }
// GET: Doctors/Delete/5 public ActionResult Delete(int id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var docBll = new DoctorBLL(); Doctor doctor = docBll.GetById(id); if (doctor == null) { return(HttpNotFound()); } return(View(doctor)); }