共用方式為


DbConnectionInterceptor.ConnectionFailed 方法

定義

開啟連線失敗且發生例外狀況時呼叫。

public virtual void ConnectionFailed (System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData eventData);
abstract member ConnectionFailed : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData -> unit
override this.ConnectionFailed : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData -> unit
Public Overridable Sub ConnectionFailed (connection As DbConnection, eventData As ConnectionErrorEventData)

參數

connection
DbConnection

連接。

eventData
ConnectionErrorEventData

連線的相關內容資訊。

實作

適用於