public ActionResult VideoGameList(int?page, string search) { if (!string.IsNullOrEmpty(search)) { var searchingVideoGame = _videoGameService.SearchByVideoGameName(search); return(View(searchingVideoGame.ToPagedList(page ?? 1, 10))); } var result = _videoGameService.GetAll(); return(View(result.ToPagedList(page ?? 1, 10))); }