Langue

IDbContextFactory<TContext> Interface

Définition

Définit une fabrique pour la création DbContext d’instances.

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)

Paramètres de type

TContext

Type DbContext à créer.

Dérivé

Remarques

Pour plus d’informations et d’exemples, consultez Utilisation de DbContextFactory .

Méthodes

Nom Description
CreateDbContext()

Crée une nouvelle instance DbContext.

CreateDbContextAsync(CancellationToken)

Crée une DbContext instance dans un contexte asynchrone.

S’applique à