Share via


DbCommandInterceptionContext<TResult>.WithCommandBehavior Method

Definition

Creates a new DbCommandInterceptionContext<TResult> that contains all the contextual information in this interception context together with the given CommandBehavior.

public System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext<TResult> WithCommandBehavior (System.Data.CommandBehavior commandBehavior);
override this.WithCommandBehavior : System.Data.CommandBehavior -> System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext<'Result>

Parameters

commandBehavior
CommandBehavior

The command behavior to associate.

Returns

A new interception context associated with the given command behavior.

Applies to