Generate index for TPH discriminator with Entity Framework Code First
When it comes to mapping inheritance hierarchies to database tables using an ORM, there are a lot of different options. Though it definitely has drawbacks, one of the most popular method is 'table-per-hierarhy' (TPH). TPH maps all the entities in the inheritance hierarchy to one table that contains