// /Pets/All public IActionResult All(int page = 1) { var allPets = this.pets.All(page); var model = new AllPetsViewModel(page) { Pets = allPets, CurrentPage = page, Total = this.pets.Total(), }; return(View(model)); }
//--------------- Methods ----------------- public IActionResult All(int page = 1) { var pets = this.pets.All(page); int totalPets = this.pets.Total(); AllPetsViewModel model = new AllPetsViewModel { Pets = pets, Total = totalPets, CurrentPage = page, }; return(View(model)); }
public IActionResult All(int page = 1) { var allPets = this.petService.All(page); var totalPets = this.petService.Total(); var model = new AllPetsViewModel { Pets = allPets, Total = totalPets, CurrentPage = page }; return(this.View(model)); }