Пример #1
0
        public IHttpActionResult GetCasesByUser(int UserId)
        {
            string sIPAddress = Request.GetOwinContext().Request.RemoteIpAddress;

            try
            {
                var UserCases = oCaseRepo.GetCasesByUser(UserId);
                oLogger.LogData("ROUTE: api/Case/{UserId}/UserCases; METHOD: GET; IP_ADDRESS: " + sIPAddress);
                return(Json(UserCases));
            }
            catch (Exception ex)
            {
                oLogger.LogData("ROUTE:  api/Case/{UserId}/UserCases; METHOD: GET; IP_ADDRESS: " + sIPAddress + "; EXCEPTION: " + ex.Message + "; INNER EXCEPTION: " + ex.InnerException);
                return(InternalServerError());
            }
        }