✅ EF Core 8.0.3 Many To Many Relation
quick question, im using entity framework core(8.0.3) code first approach:
I have 2 classes (many to many relation):
It's automatically creating the "third" table and on first entry its filling it aswell.
Now the first time I add some new stuff it works fine.
If I get the same Identifier tho it crashes, is there a way to automatically resolve it? or do I have to check if existing then add into table otherwise add to list?
Thanks in advance!
4 Replies
EF's support of hashsets is meh at best
So i should ignore them and fill all tables by myself?
The issue probably stems from the fact, that you create a duplicate entry on the join table
I'd just use
Also, not sure if your code is actually the code you use, but your navigation properties weren't properties
So that would be an issue for EF as well
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View