public async Task <ActionResult> Index(int?page, int?pageSize = 10) { var pageIndex = (page ?? 1) - 1; var bookModel = await _facade.GetPagedBookCatalogModel(pageIndex, pageSize.Value); return(View(bookModel)); }
public async Task <BookCatalogModel> Catalog(int?pageId = 1, [FromUri] int?pageSize = 2) { var pageIndex = (pageId ?? 1) - 1; return(await _facade.GetPagedBookCatalogModel(pageIndex, pageSize.Value)); }