語言

DbInterceptionContext.WithDbContext(DbContext) 方法

定義

建立 DbInterceptionContext 一個新 ,包含此攔截上下文中所有上下文資訊,並加上給定 DbContext的 。

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

要有關聯的情境。

傳回

一個與該上下文相關的新攔截上下文。

適用於