scaffolding (database first) EF Core table with no primary key

entity-framework-core

Question

I am using EF core 2.0 and using scaffolding reverse engineering database first to generate models.

some of tables does not have any primary key and EF Unable to generate entity type for table.

Any advice how can I do this other then adding manually.

1
1
1/17/2019 11:28:53 PM

Popular Answer

So far either Entity Framework or Entity Framework Core does not support generating table from EF/EF Core model class without primary key.

But this is a requested feature in Entity Framework Core. Here is the details about it:

Allow code generation for tables without a primary key

1
1/18/2019 2:38:38 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow