Entity Framework: A referential integrity constraint violation on many to many relationship

后端 未结 6 1274
一向
一向 2020-12-15 15:27

Hey I have an application with a bunch of inproc caching and entity framework. When I want to write an update to an entity I reattach the cached copy. I track all things I\'

6条回答
  •  抹茶落季
    2020-12-15 16:24

    I have just been experiencing the same issue and the resolution to mine was that I had added mappings to the association and then setup the referential contstraints.

    Inorder to resolve the issue I had to open the mappings window for the association and there was a link to delete the mappings. Once done the Mapping Details window then said Mappings are not allowed.. It appears that adding the referential constraint leaves any mappings in place.

    Thought it may be worth posting in case anyone else is looking for solutions to this error message in the future.

提交回复
热议问题