阅读背景:

附加类型为“X”的实体失败,因为同一类型的另一个实体已具有相同的主键值。错误

来源:互联网 

Hello I am quite new to MVC programming and have come across a rather strange error I cannot seem to wrap my head around. I am creating an MVC 5 application, and When I try and use the edit option from my controller, the parent entity and child entities all seem to load correctly, however when I try and save the changes back I receive the error "Attaching an entity of type 'X.Models.ApplicationUser' failed because another entity of the same type already has the same primary key value". I have the below ViewModel/Models:Hello I am quite new to MVC programming and hav




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: