Table of Contents

Class SaveChangesFailedEventArgs

Namespace
Microsoft.EntityFrameworkCore
Assembly
Microsoft.EntityFrameworkCore.dll

Event arguments for the SaveChangesFailed event.

public class SaveChangesFailedEventArgs : SaveChangesEventArgs
Inheritance
SaveChangesFailedEventArgs
Inherited Members

Remarks

See Saving data in EF Core and EF Core events for more information and examples.

Constructors

SaveChangesFailedEventArgs(bool, Exception)

Creates a new SaveChangesFailedEventArgs instance with the exception that was thrown.

public SaveChangesFailedEventArgs(bool acceptAllChangesOnSuccess, Exception exception)

Parameters

acceptAllChangesOnSuccess bool

The value passed to SaveChanges.

exception Exception

The exception thrown.

Properties

Exception

The exception thrown during or .

public virtual Exception Exception { get; }

Property Value

Exception