public GetPatientResponse getById(GetPatientRequest request) { try { var response = new GetPatientResponse(); var bc = new PatientComponent(); response.Result = bc.Find(request.Patient.Id); return(response); } catch (Exception ex) { var httpError = new HttpResponseMessage() { StatusCode = (HttpStatusCode)422, ReasonPhrase = ex.Message }; throw new HttpResponseException(httpError); } }
public ActionResult GetDataById(int id) { var patient = db.Find(id); return Json(patient, JsonRequestBehavior.AllowGet); }
public Patient Find(int id) { return(bs.Find(id)); }