Share via


DbUpdateException Class

Definition

Exception thrown by DbContext when the saving of changes to the database fails. 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 DbUpdateException : System.Data.DataException
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification="SerializeObjectState used instead")]
[System.Serializable]
public class DbUpdateException : System.Data.DataException
type DbUpdateException = class
    inherit DataException
Public Class DbUpdateException
Inherits DataException
Inheritance
DbUpdateException
Derived
Attributes

Constructors

DbUpdateException()

Initializes a new instance of the DbUpdateException class.

DbUpdateException(String, Exception)

Initializes a new instance of the DbUpdateException class.

DbUpdateException(String)

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.

Applies to