Пример #1
0
        public IHttpActionResult GetservicesPaging(int pageSize, int pageNumber)
        {
            ResponseDataDTO <PagedResults <service> > response = new ResponseDataDTO <PagedResults <service> >();

            try
            {
                response.Code    = HttpCode.OK;
                response.Message = MessageResponse.SUCCESS;
                response.Data    = _serviceservice.CreatePagedResults(pageNumber, pageSize);
            }
            catch (Exception ex)
            {
                response.Code    = HttpCode.INTERNAL_SERVER_ERROR;
                response.Message = ex.Message;
                response.Data    = null;

                Console.WriteLine(ex.ToString());
            }

            return(Ok(response));
        }