Application.Web.Controllers.LaptopsController.List C# (CSharp) Метод

List() приватный Метод

private List ( int id ) : System.Web.Mvc.ActionResult
id int
Результат System.Web.Mvc.ActionResult
        public ActionResult List(int? id)
        {
            int pageNumber = id.GetValueOrDefault(1);
            var viewModel = GetAllLaptops().Skip((pageNumber - 1) * PageSize).Take(PageSize);

            ViewBag.Pages = Math.Ceiling((double)GetAllLaptops().Count() / PageSize);
            return View(viewModel);
        }