You can find this sample in the tutorial project: Menu -> Removing an entity
This C# Beginner tutorial covers how to get an entities children. Since those children are also entities, we can retrieve their children too.
[!code-csharpEntity]