public ActionResult ActiveLots(SearchModel searchModel, string orderBy, int page = 1) { ViewBag.Title = "Active Lots"; var lots = _lotService.SearchLotModels(searchModel).Where(l => l.IsActive); var sortedLots = GetSortedLots(lots, orderBy); var lotViewModel = CreateLotViewModel(sortedLots, page); lotViewModel.SearchModel = searchModel; return(View("Lots", lotViewModel)); }