コード例 #1
0
        public async Task <JsonResult> OnPostReadAsync([DataSourceRequest] DataSourceRequest request, string ParentId = null)
        {
            var qData = (await _RoleApplication.ListOfRolesAsync(ParentId))
                        .Select(a => new vmCompo_ListGridRolesModel
            {
                Id          = a.Id,
                Name        = a.Name,
                Description = a.Description,
                HasChild    = a.HasChild,
                PageName    = a.PageName,
                ParentId    = a.ParentId,
                Sort        = a.Sort
            });

            return(new JsonResult(await qData.ToDataSourceResultAsync(request)));
        }