public IHttpActionResult GetGaragesPaging(int pageSize, int pageNumber) { ResponseDataDTO <PagedResults <Garage> > response = new ResponseDataDTO <PagedResults <Garage> >(); try { response.Code = HttpCode.OK; response.Message = MessageResponse.SUCCESS; response.Data = _Garageservice.CreatePagedResults(pageNumber, pageSize); } catch (Exception ex) { response.Code = HttpCode.INTERNAL_SERVER_ERROR; response.Message = MessageResponse.FAIL; response.Data = null; Console.WriteLine(ex.ToString()); } return(Ok(response)); }