I have a question about inheritance in Entity Framework 4. We are using a database-first approach and would like to restructure our model to use inheritance. Here is a white board mock up of the hierarchy we would like to use in our model.
In case those scribbles are not very readable, it's something like this.
USER <- PROVIDER
USER <- VENDOR
PROVIDER <- EMPLOYEE
So USER is the base class for providers and vendors. And employee then inherits from provider.
I found a couple great articles describing Table-Per-Hierarchy inheritance and Table-Per-Type inheritance.
They seem simple enough but both ways require an entity to be mapped to a table or tables. What if you have an entity that is mapped entirely to stored procedures?
Is it still possible to do inheritance in EF even if an entity is mapped to stored procedures? How would that look? What kinds of stored procedures would we need to have to accomplish this?
If it's possible we really just need pointed in the right direction.
I have searched and searched and finally arrived at the conclusion that it is not possible to do inheritance with entities that are mapped to stored procedures. So unless someone can prove otherwise, I'm marking this as the answer.