最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
EF(EntityFramework) 插入或更新数据报错的解决方法
时间:2022-06-29 09:19:40 编辑:袖梨 来源:一聚教程网
报错信息:Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. See http://go.m*icr*osof*t.com/fwlink/?LinkId=472540 for information on understanding and handling optimistic concurrency exceptions.
参考资料:
原因:主键id未设置自增,导致插入失败。
解决方案:表的主键id设置自增。
mysql设置方式:在表上右键-->设计表-->选中主键id-->勾选即可。
sqlserver设置方式:在表上右键-->设计表-->选中主键id-->双击“(是标识)”的值,改为是,标识增量和标识种子设置为1即可。
相关文章
- boostprompt:AI Agent 工具实践指南 09-30
- ai-engineering-workflow:AI Agent 工具实践指南 09-30
- 魔兽世界12.1装等掉落一览 09-30
- 无畏契约官网入口直达-2026无畏契约官网最新地址速查 09-30
- steam官网网页版入口-steam网页端登录入口 09-30
- jm漫画网页版直达-jm官网最新入口 09-30

