示例#1
0
        public ActionResult List(string category, int page = 1)
        {
            ArticlesListViewModel model = new ArticlesListViewModel
            {
                Articles = articles.GetArticlesForMainPage(PageSize, category, page),

                PageInfo = new PageInfo
                {
                    CurrentPage  = page,
                    ItemsPerPage = PageSize,
                    TotalItems   = articles.GetCountArtiles(category)
                },
                CurrentCategory = category
            };

            return(View(model));
        }