Esempio n. 1
0
        // /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));
        }
Esempio n. 2
0
        //--------------- 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));
        }
Esempio n. 3
0
        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));
        }