I Supplier class:
public class Supplier {
....
....
....
}
I also have a Subcontractor class, and Subcontractor is a provider:
public class Subcontractor:Supplier {
....
....
....
}
In my db, I have a provider table with data and another table with an id field that acts as a foreign key for the provider table, and I also have subcontent data.
In the framework entity file edmx, I declared the inheritance relation:

Now I want to get all suppliers that are not subcontractors, so I do:
context.Suppliers.OfType<Supplier>();
But it also returns subcontractors ..
How can I get only Suppliers who are not subcontractors?
Naor source
share