EntityConnection コンストラクター (MetadataWorkspace, DbConnection, Boolean)
[このページは、Entity Framework 6 に関するページです。最新バージョンは、'Entity Framework' NuGet パッケージとして入手できます。Entity Framework の詳細については、msdn.com/data/ef を参照してください。]
メモリに読み込まれたメタデータから EntityConnection を構築します
名前空間: System.Data.Entity.Core.EntityClient
アセンブリ: EntityFramework (EntityFramework.dll 内)
構文
'宣言
<SuppressMessageAttribute("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope", Justification := "Object is in fact passed to property of the class and gets Disposed properly in the Dispose() method.")> _
Public Sub New ( _
workspace As MetadataWorkspace, _
connection As DbConnection, _
entityConnectionOwnsStoreConnection As Boolean _
)
'使用
Dim workspace As MetadataWorkspace
Dim connection As DbConnection
Dim entityConnectionOwnsStoreConnection As Boolean
Dim instance As New EntityConnection(workspace, _
connection, entityConnectionOwnsStoreConnection)
[SuppressMessageAttribute("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(
MetadataWorkspace workspace,
DbConnection connection,
bool entityConnectionOwnsStoreConnection
)
[SuppressMessageAttribute(L"Microsoft.Reliability", L"CA2000:DisposeObjectsBeforeLosingScope", Justification = L"Object is in fact passed to property of the class and gets Disposed properly in the Dispose() method.")]
public:
EntityConnection(
MetadataWorkspace^ workspace,
DbConnection^ connection,
bool entityConnectionOwnsStoreConnection
)
[<SuppressMessageAttribute("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope", Justification = "Object is in fact passed to property of the class and gets Disposed properly in the Dispose() method.")>]
new :
workspace:MetadataWorkspace *
connection:DbConnection *
entityConnectionOwnsStoreConnection:bool -> EntityConnection
public function EntityConnection(
workspace : MetadataWorkspace,
connection : DbConnection,
entityConnectionOwnsStoreConnection : boolean
)
パラメーター
- workspace
型 : System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace
メタデータ情報を含むワークスペース。
- connection
型 : System.Data.Common.DbConnection
ストア接続。
- entityConnectionOwnsStoreConnection
型 : System.Boolean
true に設定した場合、エンティティ接続が破棄されたときにストア接続も破棄されます。それ以外の場合は、呼び出し元がストア接続を破棄する必要があります。