public IHierarchicalEnumerable GetChildren() { CategoryHierarchicalEnumerable children = new CategoryHierarchicalEnumerable(); foreach (Category category in CategoriesDataProvider.GetCategoryData()) { if (category.ParentId == this.CategoryId) { children.Add(category); } } return(children); }
public override IHierarchicalEnumerable Select() { CategoryHierarchicalEnumerable collection = new CategoryHierarchicalEnumerable(); foreach (Category category in CategoriesDataProvider.GetCategoryData()) { if (category.ParentId == rootCategoryId) { collection.Add(category); } } return(collection); }