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