Пример #1
0
        // @GetRoute("articles")
        public ApiResponse ArticleList(ArticleParam articleParam)
        {
            articleParam.Type = Types.ARTICLE;
            articleParam.Page--;
            Page <Contents> articles = _contentsService.findArticles(articleParam);

            return(ApiResponse <Page <Contents> > .Ok(articles));
        }
Пример #2
0
        public IActionResult Index()
        {
            var articles = _contentsService.findArticles(new ArticleParam());

            return(View(new AdminIndexModel
            {
                Articles = articles.Rows,
                ArticlesCount = (int)articles.TotalRows,
                CommentsCount = _commentsService.GetTotalCount(),
                AttachCount = _attachService.GetTotalCount()
            }));
        }