EntityConnection.State Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
Show: