public HttpResponseMessage GetGrid(ErrorLogGridRequest model) { if (!ModelState.IsValid) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } try { ItemResponse <ErrorLogGrid> resp = new ItemResponse <ErrorLogGrid>(); resp.Item = _errorService.GetGrid(model); return(Request.CreateResponse(HttpStatusCode.OK, resp)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex)); } }