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 创建的。

适用于