DbUpdateConcurrencyException DbUpdateConcurrencyException Class

An exception that is thrown when a concurrency violation is encountered while saving to the database. A concurrency violation occurs when an unexpected number of rows are affected during save. This is usually because the data in the database has been modified since it was loaded into memory.

Syntax

Declaration

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

Inheritance Hierarchy

Inherited Members

Entries,
Entries,
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 DbUpdateConcurrencyException class.

Constructors

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

    Initializes a new instance of the DbUpdateConcurrencyException class.

    public DbUpdateConcurrencyException(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 concurrency violation.

Details

Assembly

Microsoft.EntityFrameworkCore.dll