共用方式為


EntityConnection.State 屬性

定義

如果 ConnectionState 是開啟的,則取得基礎提供者的 EntityConnection 屬性, 否則傳回 Closed

public:
 virtual property System::Data::ConnectionState State { System::Data::ConnectionState get(); };
public override System.Data.ConnectionState State { get; }
member this.State : System.Data.ConnectionState
Public Overrides ReadOnly Property State As ConnectionState

屬性值

Open只有當的內部狀態和基礎提供者ConnectionState都已開啟時EntityConnection,才開啟 和 。 EntityConnection如果的狀態已開啟,但提供者已ConnectionState關閉,則這個屬性會傳Broken回 。 否則會傳回 Closed

適用於