I think I managed to answer this question myself. After digging around a lot, it turns out that the Entity Framework (as it happens in VS2008 SP1) does not actually support many many relationships very well. A structure creates a list of objects from another object through relationships that are very enjoyable, but when it comes to adding and removing relationships, this cannot be done very easily. To do this, you need to write your own stored procedures, and then register them in the Entity Framework using the Import Functions route.
There is also an additional problem with this route in that the import of functions that do not return anything, for example, adding many of the many relationships, are not added to the object context. Therefore, when you write code, you cannot just use them, as you would expect.
Currently, I'm going to just stick to these procedures in the old fashioned way using executenonquery (). Apparently, the best support for this should come in VS2010.
If someone feels that my facts are wrong, feel free to correct me.
source share