DbContext.SaveChangesFailed 事件

定义

当对或的调用 SaveChanges SaveChangesAsync 因异常而失败时引发的事件。

public event EventHandler<Microsoft.EntityFrameworkCore.SaveChangesFailedEventArgs> SaveChangesFailed;
member this.SaveChangesFailed : EventHandler<Microsoft.EntityFrameworkCore.SaveChangesFailedEventArgs> 
Public Event SaveChangesFailed As EventHandler(Of SaveChangesFailedEventArgs) 

事件类型

EventHandler<SaveChangesFailedEventArgs>

适用于