public IActionResult GetOneApprovalByCode(string approvalCode)
 {
     try
     {
         ApprovalModel approvalModel = approvalRepository.GetOneApprovalByCode(approvalCode);
         return(Ok(approvalModel));
     }
     catch (Exception ex)
     {
         Errors errors = ErrorsHelper.GetErrors(ex);
         return(StatusCode(StatusCodes.Status500InternalServerError, errors));
     }
 }
 public HttpResponseMessage GetOneApprovalByCode(string approvalCode)
 {
     try
     {
         ApprovalModel approvalModel = approvalRepository.GetOneApprovalByCode(approvalCode);
         return(Request.CreateResponse(HttpStatusCode.OK, approvalModel));
     }
     catch (Exception ex)
     {
         Errors errors = ErrorsHelper.GetErrors(ex);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, errors));
     }
 }
 public HttpResponseMessage GetOneApprovalByCode(string approvalCode)
 {
     try
     {
         HttpResponseMessage hrm = new HttpResponseMessage(HttpStatusCode.OK)
         {
             Content = new StringContent(JsonConvert.SerializeObject(approvalRepository.GetOneApprovalByCode(approvalCode)))
         };
         return(hrm);
     }
     catch (Exception ex)
     {
         Errors errors          = ErrorsHelper.GetErrors(ex);
         HttpResponseMessage hr = new HttpResponseMessage(HttpStatusCode.InternalServerError)
         {
             Content = new StringContent(errors.ToString())
         };
         return(hr);
     }
 }