Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 public ActionResult GetDataById(int id)
 {
     var patient = db.Find(id);
     return Json(patient, JsonRequestBehavior.AllowGet);
 }
Exemplo n.º 3
0
 public Patient Find(int id)
 {
     return(bs.Find(id));
 }