public IHttpActionResult GetPatientEntity(int id) { PatientEntity patientEntity = db.Find(id); if (patientEntity == null) { return(NotFound()); } return(Ok(patientEntity)); }
// GET: Patient/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PatientEntity patientEntity = db.Find(id); if (patientEntity == null) { return(HttpNotFound()); } return(View(patientEntity)); }