DbCommandInterceptionContext.WithCommandBehavior(CommandBehavior) 方法

定义

创建一个新的 DbCommandInterceptionContext ,其中包含此拦截上下文中的所有上下文信息以及给定 CommandBehavior的 。

public System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext WithCommandBehavior(System.Data.CommandBehavior commandBehavior);
member this.WithCommandBehavior : System.Data.CommandBehavior -> System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext

参数

commandBehavior
CommandBehavior

要关联的命令行为。

返回

与给定命令行为关联的新拦截上下文。

适用于