public async Task <IHttpActionResult> DeleteCase(int CaseId) { string sIPAddress = Request.GetOwinContext().Request.RemoteIpAddress; try { Case oCase = await oCaseRepo.DeleteCase(CaseId); oLogger.LogData("ROUTE: api/Case; METHOD: DELETE; IP_ADDRESS: " + sIPAddress); return(Json(oCase)); } catch (Exception ex) { oLogger.LogData("ROUTE: api/Case; METHOD: DELETE; IP_ADDRESS: " + sIPAddress + "; EXCEPTION: " + ex.Message + "; INNER EXCEPTION: " + ex.InnerException); return(InternalServerError()); } }