예제 #1
0
        public static BooksResponseModel BuildResponse(List <Book> books, PaginationParams model)
        {
            if (model.PageSize == 0)
            {
                model.PageSize = 500;
            }
            var paginationList = new PaginationList <Book>(model.PageNumber, model.PageSize);

            paginationList.Read(books);

            return(new BooksResponseModel(books.Any(), paginationList, null));
        }
예제 #2
0
 public BooksResponseModel(bool _success, PaginationList <Book> _result, List <Error> _errors)
 {
     Success = _success;
     Result  = _result;
     Errors  = _errors;
 }