public ActionResult Manage(int?page, int?items, string sortOrder, string currentFilter) { ViewData["IdSortParm"] = String.IsNullOrEmpty(sortOrder) ? "id_desc" : ""; ViewData["NameSortParm"] = sortOrder == "Name" ? "name_desc" : "Name"; ViewData["DateSortParm"] = sortOrder == "date" ? "date_desc" : "date"; ViewData["GameSortParm"] = sortOrder == "game" ? "game_desc" : "game"; var awards = _awardService.FilterSearch(currentFilter); awards = _awardService.SortList(sortOrder, awards); var result = PaginatedList <Award> .Create(awards.AsNoTracking(), page, items); var action = this.ControllerContext.ActionDescriptor.ActionName.ToString(); result.Pagination.Configure(action, currentFilter, sortOrder); return(View(result)); }