예제 #1
0
파일: NewsController.cs 프로젝트: hva/zubrs
        public async Task<ActionResult> List(int? page)
        {
            await MenuManager.InitAsync(RouteName.News);

            var model = new PaginatedList<Article>(page ?? 0, 5);
            var source = Repository.Articles
                .Where(x => x.Type != ArticleType.History)
                .OrderByDescending(x => x.Created);
            await model.SetSourceAsync(source);
            return View(model);
        }