EntityConnection.Dispose 方法 (Boolean)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
清除此連接物件
命名空間: System.Data.Entity.Core.EntityClient
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<SuppressMessageAttribute("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId := "_currentTransaction")> _
Protected Overrides Sub Dispose ( _
disposing As Boolean _
)
'用途
Dim disposing As Boolean
Me.Dispose(disposing)
[SuppressMessageAttribute("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId = "_currentTransaction")]
protected override void Dispose(
bool disposing
)
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA2213:DisposableFieldsShouldBeDisposed", MessageId = L"_currentTransaction")]
protected:
virtual void Dispose(
bool disposing
) override
[<SuppressMessageAttribute("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId = "_currentTransaction")>]
abstract Dispose :
disposing:bool -> unit
[<SuppressMessageAttribute("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId = "_currentTransaction")>]
override Dispose :
disposing:bool -> unit
protected override function Dispose(
disposing : boolean
)
參數
- disposing
類型:System.Boolean
true 表示同時釋放 Managed 和 Unmanaged 資源,false 表示只釋放 Unmanaged 資源