Пример #1
0
        // GET: Shop
        public ActionResult Index(int?page)
        {
            int pageSize = 5;
            int pageNum  = (page ?? 1);

            // Get newbook from CommonInfo model
            CommonInfo common  = new CommonInfo();
            var        newBook = common.NewBook(10);

            return(View(newBook.ToPagedList(pageNum, pageSize)));
        }