Ejemplo n.º 1
0
        public IActionResult Details(int id)
        {
            const int ItemsPerPage = 1;
            var       viewModel    = new CarsLstinViewtModel
            {
                Cars = this.carsService.GetAll(id, ItemsPerPage),
            };

            return(this.View(viewModel));
        }
Ejemplo n.º 2
0
        public IActionResult All(int id = 1)
        {
            const int ItemsPerPage = 6;
            var       viewModel    = new CarsLstinViewtModel
            {
                ItemsPerPage = ItemsPerPage,
                PageNumber   = id,
                CarsCount    = this.carsService.GetCount(),
                Cars         = this.carsService.GetAll(id, ItemsPerPage),
            };

            return(this.View(viewModel));
        }