public HttpResponseMessage Get(string searchString, string asc, int pageIndex, int pageSizeSelected, string sortKey) { DResponse dto = new DResponse(); CRUDService service = new CRUDService(); HttpResponseMessage response; try { dto = service.GetDResponse(searchString, pageIndex, pageSizeSelected, sortKey, asc); response = Request.CreateResponse(HttpStatusCode.OK, dto); } catch (ApplicationException ex) { response = Request.CreateResponse(HttpStatusCode.InternalServerError, ex); } return(response); }