EntityConnection::State Property

 

Gets the ConnectionState property of the underlying provider if the EntityConnection is open. Otherwise, returns Closed.

Namespace:   System.Data.EntityClient
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public:
property ConnectionState State {
	virtual ConnectionState get() override;
}

Property Value

Type: System.Data::ConnectionState

Open, if and only if both the EntityConnection’s internal state and the underlying provider's ConnectionState are open. If the EntityConnection’s state is open but the provider's ConnectionState is closed, this property returns Broken. Otherwise, it returns Closed.

.NET Framework
Available since 3.5
Return to top
Show: