Dil

IDbContextFactory<TContext> Arabirim

Tanım

Örnek oluşturmak DbContext için bir fabrika tanımlar.

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)

Tür Parametreleri

TContext

DbContext Oluşturulacak tür.

Türetilmiş

Açıklamalar

Daha fazla bilgi ve örnek için bkz. DbContextFactory kullanma .

Yöntemler

Veri Akışı Adı Description
CreateDbContext()

Yeni bir DbContext örneği oluşturur.

CreateDbContextAsync(CancellationToken)

Zaman uyumsuz bağlamda yeni DbContext bir örnek oluşturur.

Şunlara uygulanır