// GET: Prescriptions/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } IBL bL = new BlClass(); Prescription prescription = bL.GetPrescription(id); if (prescription == null) { return(HttpNotFound()); } return(View(prescription)); }