public HttpResponseMessage GetMenuState(int?userId) { MenuServices service = new MenuServices(); try { var _result = service.GetMenuState(userId); return(Request.CreateResponse(HttpStatusCode.OK, _result)); } catch (Exception ex) { ex.Data.Add("UserID", userId); ex.Data.Add("HTTPReferrer", "JCRAPI/MenuInfo/GetMenuState"); WebExceptionHelper.LogException(ex, null); return(Request.CreateErrorResponse(HttpStatusCode.ExpectationFailed, "Expectation Failed during Menu State SaveArg")); } }