[EF Core 8] Many-to-many relationship with payload
Hi all,
I am trying to create a many-to-many relationship as described in https://learn.microsoft.com/en-us/ef/core/modeling/relationships/many-to-many#many-to-many-and-join-table-with-payload
My models are the following:
MyDbContext:
when I try to create the initial migration I get the following error:
When adding a primary key on the
I have a few questions:
1) What am I missing and cannot make this relationship function?
2) Even if somehow the tables are produced from the migration, will the
3) Is this supposed to be the correct way to supply the join table with a
I am trying to create a many-to-many relationship as described in https://learn.microsoft.com/en-us/ef/core/modeling/relationships/many-to-many#many-to-many-and-join-table-with-payload
My models are the following:
MyDbContext:
when I try to create the initial migration I get the following error:
When adding a primary key on the
PostTag model:I have a few questions:
1) What am I missing and cannot make this relationship function?
2) Even if somehow the tables are produced from the migration, will the
PostTag table be able to return the CustomPayload and how?3) Is this supposed to be the correct way to supply the join table with a
user defined payload ?How to configure many-to-many relationships between entity types when using Entity Framework Core
