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)); }
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)); }