public HttpResponseMessage GetCustomerMobileOrders(int id, int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = "") { List <MobileOrderModel> orders = _svc.GetMobileOrders(id); var dto = new JTableDtoMobileOrdersImpl(orders, jtStartIndex, jtPageSize) { Message = string.Format("DataSource:{0}", _svc.DataSource) }; return(Request.CreateResponse(HttpStatusCode.OK, dto, _properCaseFormatter)); }
public IHttpActionResult GetCustomerMobileOrders(int id, int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = "") { try { List <MobileOrderModel> orders = _svc.GetMobileOrders(id); var dto = new JTableDtoMobileOrdersImpl(orders, jtStartIndex, jtPageSize) { Message = string.Format("DataSource:{0}", _svc.DataSource) }; return(new OkNegotiatedContentResult <JTableDtoMobileOrdersImpl>(dto, _conneg, Request, _mediaFormatters)); } catch (Exception ex) { return(new ExceptionResult(ex, this)); } }