public bool HasChildren(CategoryListView list) { return list.AllCategories.Any(c => c.ParentId == CategoryId); }
public List<CategoryView> GetChildren(CategoryListView list) { return list.AllCategories.Where(c => c.ParentId == CategoryId).ToList(); }