Language

EntityConnection.ConnectionString プロパティ

定義

EntityConnection 接続文字列を取得または設定します。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
public override string ConnectionString { get; set; }
member this.ConnectionString : string with get, set
Public Overrides Property ConnectionString As String

プロパティ値

データ ソースへの初期接続を確立するために必要な接続文字列。 既定値は空の文字列です。 閉じた接続では、現在設定されている値が返されます。 値が設定されていない場合は、空の文字列が返されます。

属性

例外

EntityConnectionのMetadataWorkspaceが初期化された後、ConnectionString プロパティを設定しようとしました。 MetadataWorkspaceは、パラメーターとしてEntityConnectionを受け取るオーバーロードによってMetadataWorkspace インスタンスが構築されるとき、またはEntityConnection インスタンスが開かれたときに初期化されます。

無効な接続文字列キーワードが指定されているか、必要な接続文字列キーワードが指定されていません。

適用対象