public async Task <JsonResult> GetListForTable(int draw, int start, int length, int?parentId) { var keywords = Request.Query["search[value]"]; var pageSearchDto = new PageSearchCommonModel { Keywords = keywords, ParentId = parentId == 0 ? null : parentId, Take = length, Skip = start }; var pagereslut = await _departmentAppService.GetPagingAysnc(pageSearchDto); var json = new { draw, recordsTotal = pagereslut.Total, recordsFiltered = pagereslut.Total, data = pagereslut.Rows }; return(Json(json)); }