语言

DbInterceptionContext.WithDbContext(DbContext) 方法

定义

创建一个包含此截获上下文中所有上下文信息以及添加给定DbContext内容的新DbInterceptionContext内容。

public System.Data.Entity.Infrastructure.Interception.DbInterceptionContext WithDbContext(System.Data.Entity.DbContext context);
member this.WithDbContext : System.Data.Entity.DbContext -> System.Data.Entity.Infrastructure.Interception.DbInterceptionContext
Public Function WithDbContext (context As DbContext) As DbInterceptionContext

参数

context
DbContext

要关联的上下文。

返回

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

适用于