Exemple #1
0
        public IEnumerable <Category> Tree(string siteId)
        {
            var allEles = cateProvider.Query(siteId);
            var cates   = HierarchyHelper.Build(allEles, o => o.ParentId == null, (p, c) => c.ParentId == p.CategoryId, (p, c) => p.Children.Add(c));

            return(cates);
        }