共用方式為


DbConnectionDispatcher.GetState(DbConnection, DbInterceptionContext) 方法

定義

public virtual System.Data.ConnectionState GetState (System.Data.Common.DbConnection connection, System.Data.Entity.Infrastructure.Interception.DbInterceptionContext interceptionContext);
abstract member GetState : System.Data.Common.DbConnection * System.Data.Entity.Infrastructure.Interception.DbInterceptionContext -> System.Data.ConnectionState
override this.GetState : System.Data.Common.DbConnection * System.Data.Entity.Infrastructure.Interception.DbInterceptionContext -> System.Data.ConnectionState
Public Overridable Function GetState (connection As DbConnection, interceptionContext As DbInterceptionContext) As ConnectionState

參數

connection
DbConnection

將執行作業的連接。

interceptionContext
DbInterceptionContext

所要呼叫內容的選擇性資訊。

傳回

作業的結果,可能已經由攔截器修改。

備註

請注意,這個方法會傳回 屬性的值。 在傳遞至這個方法的攔截內容中無法使用結果,因為攔截內容會在傳遞至攔截器之前先複製。

適用於