public IActionResult Details(int id) { const int ItemsPerPage = 1; var viewModel = new CarsLstinViewtModel { Cars = this.carsService.GetAll(id, ItemsPerPage), }; return(this.View(viewModel)); }
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)); }