Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IActionResult All(int id = 1)
- {
- if (id <= 0)
- {
- return this.NotFound();
- }
- const int ItemsPerPage = 12;
- var viewModel = new RecipesListViewModel
- {
- ItemsPerPage = ItemsPerPage,
- PageNumber = id,
- RecipesCount = this.recipesService.GetCount(),
- Recipes = this.recipesService.GetAll<RecipeInListViewModel>(id, ItemsPerPage),
- };
- return this.View(viewModel);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement