Esempio n. 1
0
        public async Task <IHttpActionResult> GetByPage(int pageNumber, int pageSize)
        {
            HttpResponseDTO <PagedResults <Room> > response = new HttpResponseDTO <PagedResults <Room> >();
            await Task.Delay(500);

            try
            {
                response.code    = 0;
                response.message = Constanst.SUCCESS;
                response.data    = roomBL.CreatePagedResults(pageNumber, pageSize);
            }
            catch (Exception e)
            {
                response.code    = 500;
                response.message = Constanst.FAIL;
                response.data    = null;
            }
            return(Ok(response));
        }