I have an "Investment" entity that is derived from "BaseEntity".
With _container.BaseEntities.OfType<Investment>()
I get an ObjectQuery that always queries the database.
Therefore I would rather have an ObjectSet<Investment>
.
I can't understand why EF doesn't support this for derived entities... Or does it? ;)
If I would go ahead and create a "root entity" in EF (which would be silly) that has associations to all my derived entities, I would get EntityCollections for those entities through the navigation properties of that one root-entity. But there must be another way...
Cheers