Entity framework many to many save

I have the following DB tables: Operation Parameter OperationToParameter (has 2 foreign keys to previous tables, both foreign keys are declared as PK as well)

I updated my EF model from DB . It created me Operation and Parameter entities, the OperationToParameter it created as association between the 2 tables with many to many relation as i need. The thing is when i am trying to do SaveChanges (my changed object is ParameterDefinition which has navigation to Operation and Parameter entities ) it throws exception- Unable to update the EntitySet '[Table Name]' because it has a DefiningQuery and no element exists in the .

how can i solve this?


这可能是因为你的表没有主键

链接地址: http://www.djcxy.com/p/64928.html

上一篇: 如何使用Xcode打开解密的IPA内容

下一篇: 实体框架多对多地保存