DbUpdateConcurrencyException 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
DbContext如果预期为实体的 SaveChanges 会导致数据库更新,但实际上数据库中没有行受到影响时引发的异常。 这通常表示数据库已同时更新,以便预期匹配的并发令牌实际上不匹配。 请注意,由于安全性和序列化后对状态条目的访问将返回 null,因此此异常引用的状态条目不会序列化。
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification="SerializeObjectState used instead")]
[System.Serializable]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", Justification="FxCop rule is wrong; Database is not two words.", MessageId="Db")]
public class DbUpdateConcurrencyException : System.Data.Entity.Infrastructure.DbUpdateException
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification="SerializeObjectState used instead")]
[System.Serializable]
public class DbUpdateConcurrencyException : System.Data.Entity.Infrastructure.DbUpdateException
type DbUpdateConcurrencyException = class
inherit DbUpdateException
Public Class DbUpdateConcurrencyException
Inherits DbUpdateException
- 继承
- 特性
构造函数
| 名称 | 说明 |
|---|---|
| DbUpdateConcurrencyException() |
初始化 DbUpdateException 类的新实例。 |
| DbUpdateConcurrencyException(String, Exception) |
初始化 DbUpdateException 类的新实例。 |
| DbUpdateConcurrencyException(String) |
初始化 DbUpdateException 类的新实例。 |
属性
| 名称 | 说明 |
|---|---|
| Entries |
获取 DbEntityEntry 表示无法保存到数据库的实体的对象。 (继承自 DbUpdateException) |