EntityConnection.Dispose 方法 (Boolean)
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 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,则同时释放托管资源和非托管资源;如果为 false,则仅释放非托管资源