語言

IExceptionDetector 介面

定義

EF 內部程式碼與資料庫提供者用以偵測各種例外類型。

public interface IExceptionDetector
type IExceptionDetector = interface
Public Interface IExceptionDetector

備註

服役期間為 Singleton。 這表示單一實例會被多個 DbContext 實例使用。 實作必須是執行緒安全的。 此服務無法依賴於註冊為 Scoped的服務。

更多資訊與範例請參見 資料庫提供者與擴充功能的實作 。

方法

名稱 Description
IsCancellation(Exception, CancellationToken)

回傳所提供的例外是否代表當前提供者的取消事件。

適用於