I have an existing SQL Server database using Entity Framework code-first with a table-per-hierarchy option.
This means there is a Discriminator
column in table Persons
representing the different possible types - let's say "Doctor" and "Nurse".
Now, I want to move over to managing the database in a Visual Studio Database Project (SSDT). And at the same time generate the pocos from the database, to still use Entity Framework (except for the migration part).
I have tried the Entity Framework Reverse POCO Generator which seems quite alright. But it only generates a Person.cs
file - no Doctor.cs
(Doctor : Person
) or Nurse.cs
(Nurse : Person
).
So a class hierarchy is not created from the Person
table via the discriminator column.
Questions:
- Is there a way to configure table-per-hierarchy for Entity Framework Reverse POCO Generator?
- If no, is there another Entity Framework tool that can achieve it?