// @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)); }
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() })); }