IDesignTimeDbContextFactory<TContext> IDesignTimeDbContextFactory<TContext> IDesignTimeDbContextFactory<TContext> Interface

Definition

A factory for creating derived DbContext instances. Implement this interface to enable design-time services for context types that do not have a public default constructor. At design-time, derived DbContext instances can be created in order to enable specific design-time experiences such as Migrations. Design-time services will automatically discover implementations of this interface that are in the startup assembly or the same assembly as the derived context.

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

The type of the context.

Methods

CreateDbContext(String[]) CreateDbContext(String[]) CreateDbContext(String[])

Creates a new instance of a derived context.

Applies to