Reputation: 164
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.
Upvotes: 2
Views: 5764
Reputation: 164
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.
Upvotes: 11