コード例 #1
0
        public IActionResult ArticleList(DataSourceRequest command, string parentCategoryId)
        {
            var articles  = _knowledgebaseViewModelService.PrepareKnowledgebaseArticleGridModel(parentCategoryId, command.Page, command.PageSize);
            var gridModel = new DataSourceResult
            {
                Data  = articles.knowledgebaseArticleGridModels.ToList(),
                Total = articles.totalCount
            };

            return(Json(gridModel));
        }
コード例 #2
0
        public async Task <IActionResult> ArticleList(DataSourceRequest command, string parentCategoryId)
        {
            var(knowledgebaseArticleGridModels, totalCount) = await _knowledgebaseViewModelService.PrepareKnowledgebaseArticleGridModel(parentCategoryId, command.Page, command.PageSize);

            var gridModel = new DataSourceResult
            {
                Data  = knowledgebaseArticleGridModels.ToList(),
                Total = totalCount
            };

            return(Json(gridModel));
        }