次の方法で共有


EntityConnection.State プロパティ

[このページは、Entity Framework 6 に関するページです。最新バージョンは、'Entity Framework' NuGet パッケージとして入手できます。Entity Framework の詳細については、msdn.com/data/ef を参照してください。]

EntityConnection の状態を取得します。これは、この EntityConnection でラップされている基になるデータベース接続の状態を追跡するためにセットアップされます。

名前空間:  System.Data.Entity.Core.EntityClient
アセンブリ:  EntityFramework (EntityFramework.dll 内)

構文

'宣言
<SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")> _
Public Overrides ReadOnly Property State As ConnectionState 
    Get
'使用
Dim instance As EntityConnection 
Dim value As ConnectionState 

value = instance.State
[SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
public override ConnectionState State { get; }
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
public:
virtual property ConnectionState State {
    ConnectionState get () override;
}
[<SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")>]
abstract State : ConnectionState
[<SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")>]
override State : ConnectionState
override function get State () : ConnectionState

プロパティ値

型 : System.Data.ConnectionState

Implements

IDbConnection.State

参照

参照

EntityConnection クラス

System.Data.Entity.Core.EntityClient 名前空間