EntityFramework5.0 批量插入错误
来源:互联网 发布:唐山网站怎么做seo 编辑:程序博客网 时间:2024/04/26 14:56
错误信息:
对数据库所做的更改已成功提交,但在更新对象上下文时出错。此 ObjectContext 可能处于不一致状态。内部异常消息: AcceptChanges 无法继续,因为该对象的键值与 ObjectStateManager 中的另一个对象冲突。请在调用 AcceptChanges 之前,确保键值是唯一的。
The changes to the database were committed successfully, but an error occurred while updating the object context. The ObjectContext might be in an inconsistent state. Inner exception message: AcceptChanges cannot continue because the object's key values conflict with another object in the ObjectStateManager. Make sure that the key values are unique before calling AcceptChanges.
请尝试在edmx文件中将对应实体ID的StoreGeneratedPattern改为Identity。
如下:
1 0
- EntityFramework5.0 批量插入错误
- VS2010安装EntityFramework5.0
- VS2010 安装最新版EntityFramework5.0
- EntityFramework5.0 Code First add-migration
- Yii2.0 批量插入数据
- 安装EntityFramework5
- 批量插入
- 批量插入
- 批量插入
- 批量插入
- 批量插入
- 批量插入
- 批量插入
- mybatis批量插入报错:','附近有错误
- 批量保存,批量插入数据
- mybatis批量插入、批量删除
- Mybatis 批量插入、批量更新
- mybatis3批量更新 批量插入
- html5 父页面调用子页面js方法
- jmap -histo pid 输出的[C [B [I [S methodKlass的含义
- 大众浴室大众难寻 你怎么看?最新大众浴池图片|兴泉大众浴池|东郊大众浴池|丰台区大众浴池加盟
- 前向星
- Hadoop cluster security 1: How to enable HDFS permission ACl
- EntityFramework5.0 批量插入错误
- Spring组件扫描<context:component-scan/>使用详解
- c++ 设计模式之原型模式
- php查看mysql错误位置
- Oracle Sql 原理及优化
- OC视频笔记(不可变字典常用方法,与优化方法)(可变字典的常用方法)
- nova quota
- RBM为什么选择logsitic函数?
- 网页html中嵌入特殊字体