TransactionHandler.MatchesParentContext 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
检查提供的拦截上下文是包含目标上下文还是提供的连接与目标上下文所使用的连接相同。
protected internal virtual bool MatchesParentContext(System.Data.Common.DbConnection connection, System.Data.Entity.Infrastructure.Interception.DbInterceptionContext interceptionContext);
abstract member MatchesParentContext : System.Data.Common.DbConnection * System.Data.Entity.Infrastructure.Interception.DbInterceptionContext -> bool
override this.MatchesParentContext : System.Data.Common.DbConnection * System.Data.Entity.Infrastructure.Interception.DbInterceptionContext -> bool
Protected Friend Overridable Function MatchesParentContext (connection As DbConnection, interceptionContext As DbInterceptionContext) As Boolean
参数
- connection
- DbConnection
一种联系。
- interceptionContext
- DbInterceptionContext
截获上下文。
返回
true 如果提供的拦截上下文包含目标上下文或提供的连接与目标上下文使用的上下文相同(如果提供的拦截上下文不包含任何上下文); false 否则。
注解
请注意,调用此方法将触发从