Sprache

IDbContextFactory<TContext> Schnittstelle

Definition

Definiert eine Factory zum Erstellen von DbContext Instanzen.

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)

Typparameter

TContext

Der DbContext zu erstellende Typ.

Abgeleitet

Hinweise

Weitere Informationen und Beispiele finden Sie unter Verwenden von DbContextFactory .

Methoden

Name Beschreibung
CreateDbContext()

Erstellt eine neue DbContext-Instanz.

CreateDbContextAsync(CancellationToken)

Erstellt eine neue DbContext Instanz in einem asynchronen Kontext.

Gilt für: