共用方式為


IRelationalConnection.DbConnection 屬性

定義

取得或設定用來連接到資料庫的基礎 DbConnection

public System.Data.Common.DbConnection DbConnection { get; }
public virtual System.Data.Common.DbConnection DbConnection { get; set; }
public System.Data.Common.DbConnection DbConnection { get; set; }
member this.DbConnection : System.Data.Common.DbConnection
member this.DbConnection : System.Data.Common.DbConnection with get, set
Public ReadOnly Property DbConnection As DbConnection
Public Overridable Property DbConnection As DbConnection
Public Property DbConnection As DbConnection

屬性值

備註

只有在現有連接未開啟時,才能變更連線。

請注意,連線必須由應用程式程式碼處置,因為它不是由 Entity Framework 所建立。

適用於