public IActionResult List(string category, int lotPage = 1) { var lots = _lotService.GetActiveLotsByCategory(category); var lotsOnPage = lots.Skip((lotPage - 1) * _pageSize).Take(_pageSize); var lotViewModels = _maper.Map <IEnumerable <Lot>, IEnumerable <LotSummaryViewModel> >(lotsOnPage); return(View(new LotsListViewModel { Lots = lotViewModels, PagingInfo = new PagingInfoViewModel { CurrentPage = lotPage, ItemsPerPage = _pageSize, TotalItems = lots.Count() }, CurrentCategory = category })); }