public ActionResult Index(int?id) { Pagintation paginat = new Pagintation(id); var request = (from c in db.preposts orderby c.id descending select c).Skip(paginat.firstElement).Take(elementPage); List <preposts> content = request.ToList(); ListContent listContent = new ListContent(content); ViewBag.Preposts = listContent.GetCardPage(elementLine); ViewBag.Pagination = paginat; return(View()); }