public async Task <IHttpActionResult> GetCaseSummary(int CaseId, CaseSummaryRequestModel oCaseRequest) { string sIPAddress = Request.GetOwinContext().Request.RemoteIpAddress; try { var CaseCodesByID = await oCaseCodeRepo.GetCaseCaseCodesByCaseID(CaseId); var lstCaseSummary = oCaseRepo.GetCaseSummary(CaseCodesByID, oCaseRequest); return(Json(lstCaseSummary)); } catch (Exception ex) { oLogger.LogData("ROUTE: api/Case/{CaseId}/CaseSummary; METHOD: POST; IP_ADDRESS: " + sIPAddress + "; EXCEPTION: " + ex.Message + "; INNER EXCEPTION: " + ex.InnerException); return(InternalServerError()); } }