共用方式為


ISaveChangesInterceptor.SaveChangesFailedAsync 方法

定義

在 中 DbContext.SaveChangesAsync 擲回例外狀況時呼叫。

public System.Threading.Tasks.Task SaveChangesFailedAsync (Microsoft.EntityFrameworkCore.Diagnostics.DbContextErrorEventData eventData, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task SaveChangesFailedAsync (Microsoft.EntityFrameworkCore.Diagnostics.DbContextErrorEventData eventData, System.Threading.CancellationToken cancellationToken = default);
abstract member SaveChangesFailedAsync : Microsoft.EntityFrameworkCore.Diagnostics.DbContextErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
abstract member SaveChangesFailedAsync : Microsoft.EntityFrameworkCore.Diagnostics.DbContextErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.SaveChangesFailedAsync : Microsoft.EntityFrameworkCore.Diagnostics.DbContextErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SaveChangesFailedAsync (eventData As DbContextErrorEventData, Optional cancellationToken As CancellationToken = Nothing) As Task
Public Overridable Function SaveChangesFailedAsync (eventData As DbContextErrorEventData, Optional cancellationToken As CancellationToken = Nothing) As Task

參數

eventData
DbContextErrorEventData

關於失敗的內容資訊。

cancellationToken
CancellationToken

等候 CancellationToken 工作完成時要觀察的 。

傳回

代表非同步作業的 Task

例外狀況

適用於