I´m doing the Walkthrough: Mapping Inheritance – Table-per-Hierarchy (Entity Data Model Tools).
This is the model:

The entities Instructor and Student are derived types with the BaseType Person.
The problem is: How can I query the Instructor and Student entities directly in LINQ if they are not visible in ObjectContext?
I was expecting to do somenthig like this:
var result = from student in ctx.Students select student;
The derived entities seems to exist only as entities (EntityObject) and not as ObjectSet.
Thanks!
You should have a
Peopleproperty on theObjectContextclass that is generated for you. From there, you can get all the base types:Or, if you want a specific derived type, you can use the
OfTypeextension method onIQueryable<T>, like so: