Be very very careful if you use TPT (Table-Per-Type) inheritance with the Entity Framework. Especially if you have 26 types of documents. I made a blog post about broken SQL generation for TPT inheritance, and also opened a bug in Microsoft Connect . MS admitted to the problem, and they say that they are working on it, but do not hold your breath. It took them 3 months to confirm this problem, and all they said was, “We know about performance issues with TPT hierarchies. We are currently studying solutions and expect improvements in this area in a future version.”
With 26 types of documents, even with a basic query, EF will take about 2 minutes to generate SQL (which will be in the region of 8000 lines) and SQL Server to process it. You will have 30 levels in funny subqueries. Avoid TPT inheritance at all costs. If you are just starting the application, it looks like it works because you usually only have a few subtypes, but as soon as you add more, your application will scan slowly.
Samuel meacham
source share