Can you select all child collections of a collection of entities as a single collection?
c#-4.0, entity-framework, linq-to-entities
Solution
var children=parents.SelectMany(p=>p.Children)
Problem
I have a collection of "ParentEntity", each one of which has a collection of "ChildEntity". I'd like to select ALL of the ChildEntity as a single collection. ``` var children = from p in parents select p.Children; ``` Returns a collection of ChildEntity collections? I'd like to get a single collection of all the Children, rather than a collection of collections.