Example #1
0
    public IHierarchicalEnumerable GetChildren()
    {
        CategoryHierarchicalEnumerable children = new CategoryHierarchicalEnumerable();

        foreach (Category category in CategoriesDataProvider.GetCategoryData())
        {
            if (category.ParentId == this.CategoryId)
            {
                children.Add(category);
            }
        }

        return(children);
    }
Example #2
0
    public override IHierarchicalEnumerable Select()
    {
        CategoryHierarchicalEnumerable collection = new CategoryHierarchicalEnumerable();

        foreach (Category category in CategoriesDataProvider.GetCategoryData())
        {
            if (category.ParentId == rootCategoryId)
            {
                collection.Add(category);
            }
        }

        return(collection);
    }