lycian
Many to Many with Entity Framework
I am an absolute newbie to EF, so keep that in mind.
I would have thought that if I had the following
and the following model creation
then if I needed to insert a new
A
I wouldn't have to do anything other than
but I'm getting an error with
I tried reading through the many-to-many docs but didn't find anything in particular: https://learn.microsoft.com/en-us/ef/core/modeling/relationships/many-to-many
I would have thought if the id already existed, then it would be inserting a relationship with the implicitly created mapping table. Is there a different way I should be adding A
?6 replies