I have been searching for way to perform a linq query to get an object graph based on a specific child inheritance type. I may have prased this a little wrong, but I will try to explain.
Lets say I have a EF4 model that has a City entity, a subdivision entity, a house entity and a feature entity. The city has a one to many relationship with subdivision. The subdivision has a one to many relationship to a house. And a house has a one to many relationship with a feature. Two entities subtype the feature entity. Lets call them pool and driveway.
What would the c# linq query be to query the object graphs for all cities that have houses with a feature.OfType "Pool" with city at the root of the graph?
similar to: var cities = from city in context.Cities where ?????? select city