public async Task <IActionResult> Index(ArticleCategoryFilterModel filter) { var categoryPageList = await _articleCategoryService.GetAsync(new ArticleCategoryFilter { CreatedById = filter.CreatedById, CreatedDateFrom = filter.CreatedDateFrom, CreatedDateTo = filter.CreatedDateTo, Page = filter.Page, PageSize = _pagerOptions.PageSize, Keyword = filter.Search, UpdatedById = filter.UpdatedById, StatusId = filter.StatusId }); var categories = categoryPageList.Collections.Select(x => new ArticleCategoryModel { CreatedById = x.CreatedById, CreatedBy = x.CreatedBy, CreatedDate = x.CreatedDate, Description = x.Description, Id = x.Id, Name = x.Name, ParentCategoryName = x.ParentCategoryName, ParentId = x.ParentId, UpdateById = x.UpdatedById, UpdatedDate = x.UpdatedDate, UpdatedBy = x.UpdatedBy, StatusId = (ArticleCategoryStatus)x.StatusId }); var categoryPage = new PageListModel <ArticleCategoryModel>(categories) { Filter = filter, TotalPage = categoryPageList.TotalPage, TotalResult = categoryPageList.TotalResult }; if (_httpHelper.IsAjaxRequest(Request)) { return(PartialView("Partial/_ArticleCategoryTable", categoryPage)); } return(View(categoryPage)); }