I had the same problem before. Here is the way I solved it:
public void GetAllChildCategories(ProductCategory ParentCategory)
{
ParentCategory.ChildCategories = GetChildCategories(ParentCategory.ID);
foreach(ProductCategory cat in ParentCategory.ChildCategories)
{
GetAllChildCategories(cat);
}
}