Esempio n. 1
0
        public ICollection <Sector> GetSectors()
        {
            var result = _sectorService.Get();
            var tree   = result.ToList().GenerateTree(x => x.Id, x => x.ParentId);
            var list   = new List <Sector>();

            GenericHelpers.CreateSequentialTree(tree.ToList(), list);
            return(list);
        }