DbUpdateConcurrencyException Class

Definition

Exception thrown by DbContext when it was expected that SaveChanges for an entity would result in a database update but in fact no rows in the database were affected. This usually indicates that the database has been concurrently updated such that a concurrency token that was expected to match did not actually match. Note that state entries referenced by this exception are not serialized due to security and accesses to the state entries after serialization will return 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
Inheritance
DbUpdateConcurrencyException
Attributes

Constructors

DbUpdateConcurrencyException()

Initializes a new instance of the DbUpdateException class.

DbUpdateConcurrencyException(String)

Initializes a new instance of the DbUpdateException class.

DbUpdateConcurrencyException(String, Exception)

Initializes a new instance of the DbUpdateException class.

Properties

Entries

Gets DbEntityEntry objects that represents the entities that could not be saved to the database.

(Inherited from DbUpdateException)

Applies to