I have the two entities, Arena and Regulator, which have a many to many relationship between them. I have implemented what seems to be the EF code first accepted solution (
I have the same issue with EF not managing Many to Many relations. I disagree the solution provided by Mystere Man. I use RefactorThis.GraphDiff for all the collection updates using EF Code First. But it is not fair to say it is incorrect.
Like GilShalit has mentioned, nhibernate handles it brillinatly. It makes me fell, EF is not fully developed product. It is not our job to fetch all collection and check add/delete all these stuff. It is looks very nasty. while the collections are added, EF should handle which one to add and which one to remove. Thankfully RefactorThis.GraphDiff is helping for the time being. I prefer nhibernate not ef. Unfortunately I need to use EF in the current project.