public IActionResult Index(int page = 1) { var actors = actorServices.ListAllActors(page, PageSize); var totalActors = actorServices.Count(); var vm = new ActorPageListingViewModel { Actors = actors, CurrentPage = page, TotalPages = (int)Math.Ceiling(totalActors / (double)PageSize), Search = "" }; return(View(vm)); }