InvalidOperationException when calling SaveChanges in .NET Entity framework

后端 未结 8 1271
小蘑菇
小蘑菇 2020-12-03 17:22

I\'m trying to learn how to use the Entity framework but I\'ve hit an issue I can\'t solve. What I\'m doing is that I\'m walking through a list of Movies that I have and ins

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-03 18:03

    Check if Primary Keys are missing in any of your etities, if yes, then create them, and do the "UpdateModel from Database"

    this should Solve the problem

提交回复
热议问题