State Property
Collapse the table of content
Expand the table of content

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 override ConnectionState State { get; }

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
© 2016 Microsoft