I\'m already familiar with Linq but have little understanding of extension methods I\'m hoping someone can help me out.
So I have this hierarchical collection pseudo cod
static IEnumerable FindProductById(this IEnumerable source, int id) { return source.FirstOrDefault(product => product.Id = id) ?? source.SelectMany(product => product.Children).FindProductById(id); }