DbUpdateException DbUpdateException Class

An exception that is thrown when an error is encountered while saving to the database.

Syntax

Declaration

public class DbUpdateException : Exception, ISerializable, _ExceptionPublic Class DbUpdateException
    Inherits Exception
    Implements ISerializable, _Exception

Inheritance Hierarchy

  • System.Object
    System.Object
  • System.Exception
    System.Exception
  • DbUpdateException
    DbUpdateException

Inherited Members

GetBaseException(),
GetBaseException(),
ToString(),
ToString(),
GetObjectData(SerializationInfo, StreamingContext),
GetObjectData(SerializationInfo, StreamingContext),
GetType(),
GetType(),
Message,
Message,
Data,
Data,
InnerException,
InnerException,
TargetSite,
TargetSite,
StackTrace,
StackTrace,
HelpLink,
HelpLink,
Source,
Source,
HResult,
HResult,
SerializeObjectState,
SerializeObjectState,
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
MemberwiseClone()
MemberwiseClone()

Constructors summary

Initializes a new instance of the DbUpdateException class.

Initializes a new instance of the DbUpdateException class.

Initializes a new instance of the DbUpdateException class.

Properties summary

Gets the entries that were involved in the error. Typically this is a single entry, but in some cases it may be zero or multiple entries.

Constructors

  • DbUpdateException(String, IReadOnlyList<IUpdateEntry>)
    DbUpdateException(String, IReadOnlyList(Of IUpdateEntry))

    Initializes a new instance of the DbUpdateException class.

    public DbUpdateException(string message, IReadOnlyList<IUpdateEntry> entries)Public Sub New(message As String, entries As IReadOnlyList(Of IUpdateEntry))

    Parameters

    • message
      System.String
      System.String

      The error message that explains the reason for the exception.

    • entries
      System.Collections.Generic.IReadOnlyList<T><IUpdateEntry>
      System.Collections.Generic.IReadOnlyList<T>(Of IUpdateEntry)

      The entries that were involved in the error.

  • DbUpdateException(String, Exception)
    DbUpdateException(String, Exception)

    Initializes a new instance of the DbUpdateException class.

    public DbUpdateException(string message, Exception innerException)Public Sub New(message As String, innerException As Exception)

    Parameters

    • message
      System.String
      System.String

      The error message that explains the reason for the exception.

    • innerException
      System.Exception
      System.Exception

      The exception that is the cause of the current exception.

  • DbUpdateException(String, Exception, IReadOnlyList<IUpdateEntry>)
    DbUpdateException(String, Exception, IReadOnlyList(Of IUpdateEntry))

    Initializes a new instance of the DbUpdateException class.

    public DbUpdateException(string message, Exception innerException, IReadOnlyList<IUpdateEntry> entries)Public Sub New(message As String, innerException As Exception, entries As IReadOnlyList(Of IUpdateEntry))

    Parameters

    • message
      System.String
      System.String

      The error message that explains the reason for the exception.

    • innerException
      System.Exception
      System.Exception

      The exception that is the cause of the current exception.

    • entries
      System.Collections.Generic.IReadOnlyList<T><IUpdateEntry>
      System.Collections.Generic.IReadOnlyList<T>(Of IUpdateEntry)

      The entries that were involved in the error.

Properties

  • Entries
    Entries

    Gets the entries that were involved in the error. Typically this is a single entry, but in some cases it may be zero or multiple entries.

    public virtual IReadOnlyList<EntityEntry> Entries { get; }Public Overridable ReadOnly Property Entries As IReadOnlyList(Of EntityEntry)

    Property Value

    • System.Collections.Generic.IReadOnlyList<T><EntityEntry>
      System.Collections.Generic.IReadOnlyList<T>(Of EntityEntry)

Details

Assembly

Microsoft.EntityFrameworkCore.dll