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));
        }
 public BooksResponseModel(bool _success, PaginationList <Book> _result, List <Error> _errors)
 {
     Success = _success;
     Result  = _result;
     Errors  = _errors;
 }