System.InvalidOperationException: Cannot use table x for entity type y

entity-framework-core

Question

Microsoft.EntityFrameworkCore.Relational: Cannot use table x for entity type y since it is being used for entity type x and there is no relationship between the primary key of x and the primary key of y.

1
1
2/7/2018 11:12:23 PM

Accepted Answer

In my case, I accidentally used the same name for 2 tables (TableAttribute) while defining the schema in the data layer. Fixing the naming fixed this issue.

3
2/8/2018 5:51:11 PM


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