共用方式為


IDbConnectionInterceptor.ConnectionFailed 方法

定義

關閉連線失敗時呼叫,但發生例外狀況。

public void ConnectionFailed (System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData eventData);
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
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 Sub ConnectionFailed (connection As DbConnection, eventData As ConnectionErrorEventData)
Public Overridable Sub ConnectionFailed (connection As DbConnection, eventData As ConnectionErrorEventData)

參數

connection
DbConnection

連接。

eventData
ConnectionErrorEventData

連線的相關內容資訊。

適用於