EntityConnection コンストラクター

定義

オーバーロード

EntityConnection()

EntityConnection クラスの新しいインスタンスを初期化します。

EntityConnection(String)

接続文字列に基づいて、EntityConnection クラスの新しいインスタンスを初期化します。

EntityConnection(MetadataWorkspace, DbConnection)

指定した EntityConnection および MetadataWorkspace を使用して、DbConnection クラスの新しいインスタンスを初期化します。

EntityConnection(MetadataWorkspace, DbConnection, Boolean)

メモリに読み込まれたメタデータから EntityConnection を構築します

EntityConnection()

EntityConnection クラスの新しいインスタンスを初期化します。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope", Justification="Object is in fact passed to property of the class and gets Disposed properly in the Dispose() method.")]
public EntityConnection ();
Public Sub New ()
属性

適用対象

EntityConnection(String)

接続文字列に基づいて、EntityConnection クラスの新しいインスタンスを初期化します。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope", Justification="Object is in fact passed to property of the class and gets Disposed properly in the Dispose() method.")]
public EntityConnection (string connectionString);
new System.Data.Entity.Core.EntityClient.EntityConnection : string -> System.Data.Entity.Core.EntityClient.EntityConnection
Public Sub New (connectionString As String)

パラメーター

connectionString
String

プロバイダー固有の接続文字列。

属性

例外

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

適用対象

EntityConnection(MetadataWorkspace, DbConnection)

指定した EntityConnection および MetadataWorkspace を使用して、DbConnection クラスの新しいインスタンスを初期化します。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope", Justification="Object is in fact passed to property of the class and gets Disposed properly in the Dispose() method.")]
public EntityConnection (System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace workspace, System.Data.Common.DbConnection connection);
new System.Data.Entity.Core.EntityClient.EntityConnection : System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace * System.Data.Common.DbConnection -> System.Data.Entity.Core.EntityClient.EntityConnection
Public Sub New (workspace As MetadataWorkspace, connection As DbConnection)

パラメーター

workspace
MetadataWorkspace

この MetadataWorkspace に関連付けられた EntityConnection

connection
DbConnection

この EntityConnection オブジェクトの基になるデータ ソース接続。

属性

例外

workspace または connection パラメーターが null です。

概念モデルがワークスペースにありません。または、マッピング ファイルがワークスペースにありません。または、ストレージ モデルがワークスペースにありません。または、接続が閉じられている状態ではありません。

connection が ADO.NET Entity Framework 互換のプロバイダーからのものではありません。

適用対象

EntityConnection(MetadataWorkspace, DbConnection, Boolean)

メモリに読み込まれたメタデータから EntityConnection を構築します

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope", Justification="Object is in fact passed to property of the class and gets Disposed properly in the Dispose() method.")]
public EntityConnection (System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace workspace, System.Data.Common.DbConnection connection, bool entityConnectionOwnsStoreConnection);
new System.Data.Entity.Core.EntityClient.EntityConnection : System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace * System.Data.Common.DbConnection * bool -> System.Data.Entity.Core.EntityClient.EntityConnection
Public Sub New (workspace As MetadataWorkspace, connection As DbConnection, entityConnectionOwnsStoreConnection As Boolean)

パラメーター

workspace
MetadataWorkspace

メタデータ情報を含むワークスペース。

connection
DbConnection

ストア接続。

entityConnectionOwnsStoreConnection
Boolean

true に設定すると、エンティティ接続が破棄されるときにストア接続が破棄されます。それ以外の場合、呼び出し元はストア接続を破棄する必要があります。

属性

適用対象