Language

IDbContextFactory<TContext> インターフェイス

定義

DbContextインスタンスを作成するためのファクトリを定義します。

public interface IDbContextFactory<TContext> where TContext : DbContext
public interface IDbContextFactory<out TContext> where TContext : DbContext
type IDbContextFactory<'Context (requires 'Context :> DbContext)> = interface
Public Interface IDbContextFactory(Of TContext)
Public Interface IDbContextFactory(Of Out TContext)

型パラメーター

TContext

作成する DbContext 型。

派生

注釈

詳細と例については、 DbContextFactory の使用 を参照してください。

メソッド

Name 説明
CreateDbContext()

新しい DbContext インスタンスを作成します。

CreateDbContextAsync(CancellationToken)

非同期コンテキストで新しい DbContext インスタンスを作成します。

適用対象