TransactionHandler.Disposing 方法 (DbConnection, DbConnectionInterceptionContext)
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
可在派生类中实现。
命名空间: System.Data.Entity.Infrastructure
程序集: EntityFramework(在 EntityFramework.dll 中)
语法
声明
Public Overridable Sub Disposing ( _
connection As DbConnection, _
interceptionContext As DbConnectionInterceptionContext _
)
用法
Dim instance As TransactionHandler
Dim connection As DbConnection
Dim interceptionContext As DbConnectionInterceptionContext
instance.Disposing(connection, interceptionContext)
public virtual void Disposing(
DbConnection connection,
DbConnectionInterceptionContext interceptionContext
)
public:
virtual void Disposing(
DbConnection^ connection,
DbConnectionInterceptionContext^ interceptionContext
)
abstract Disposing :
connection:DbConnection *
interceptionContext:DbConnectionInterceptionContext -> unit
override Disposing :
connection:DbConnection *
interceptionContext:DbConnectionInterceptionContext -> unit
public function Disposing(
connection : DbConnection,
interceptionContext : DbConnectionInterceptionContext
)
参数
- connection
类型:System.Data.Common.DbConnection
要释放的连接。
- interceptionContext
类型:DbConnectionInterceptionContext
与调用关联的上下文信息。