Unable to track an entity of type 'xxx' because primary key property 'Id' is null.

4563人阅读 2020/5/6 14:27 总访问:34960 评论:0 收藏:0 手机
分类: ef

这个是ef中添加报错,id如果是自增的话id不需要赋值,如果id不是自增就必须要赋值,这种报错的情况就是id不是自增

评价
聪明如你,阳光如你
排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2024TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
欢迎加群交流技术