共用方式為


EntityConnection 建構函式

[此頁面專屬於 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
'用途
Dim instance As New EntityConnection()
[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()
[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()
[<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 : unit -> EntityConnection
public function EntityConnection()

請參閱

參考

EntityConnection 類別

EntityConnection 多載

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