次の方法で共有


EntityConnection.ConnectionString プロパティ

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

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

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

構文

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

value = instance.ConnectionString

instance.ConnectionString = value
[SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
public override string ConnectionString { get; set; }
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
public:
virtual property String^ ConnectionString {
    String^ get () override;
    void set (String^ value) override;
}
[<SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")>]
abstract ConnectionString : string with get, set
[<SuppressMessageAttribute("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")>]
override ConnectionString : string with get, set
override function get ConnectionString () : String 
override function set ConnectionString (value : String)

プロパティ値

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

Implements

IDbConnection.ConnectionString

参照

参照

EntityConnection クラス

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