Пример #1
0
        public IActionResult Nodes()
        {
            var data  = DefaultStorage.CatgList();
            var nodes = data.Select(x => new Node {
                Id = x.Id.ToString(), Text = x.Name, Pid = x.ParentId.ToString(), IsParent = x.IsParent
            }).ToHierarchy("0");

            return(Json(nodes));
        }