예제 #1
0
        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);
        }