MutableInterceptionContext<TResult>.WithDbContext(DbContext) 方法

定义

创建一个新的 MutableInterceptionContext<TResult> ,其中包含此拦截上下文中的所有上下文信息,并添加给定 ObjectContext的 。

public System.Data.Entity.Infrastructure.Interception.MutableInterceptionContext<TResult> WithDbContext (System.Data.Entity.DbContext context);
override this.WithDbContext : System.Data.Entity.DbContext -> System.Data.Entity.Infrastructure.Interception.MutableInterceptionContext<'Result>
Public Function WithDbContext (context As DbContext) As MutableInterceptionContext(Of TResult)

参数

context
DbContext

要关联的上下文。

返回

与给定上下文关联的新拦截上下文。

适用于