public ActionResult NewsList(int?page) { int pageNum = 1; if (page != null) { pageNum = page.Value; } DataModel dataModel = new DataModel(); int pageSize = 10; dataModel.NewsItems = NewsItems.GetPagedNewsItems(pageNum, pageSize, 0); int itemsCount = NewsItems.CountNewsItems(0); dataModel.Pager = new Pager(itemsCount, pageNum, pageSize); return(View(dataModel)); }