Class DesignTimeDbContextFactory
- Namespace
- SEBT.Portal.Infrastructure.Data
- Assembly
- SEBT.Portal.Infrastructure.dll
Factory for creating PortalDbContext at design time (EF Core migrations tooling). Bypasses the full DI container, which requires plugin assemblies and external services that aren't available during migration generation.
public class DesignTimeDbContextFactory
- Inheritance
-
objectDesignTimeDbContextFactory
Methods
CreateDbContext(string[])
Creates a new instance of a derived context.
public PortalDbContext CreateDbContext(string[] args)
Parameters
argsstring[]Arguments provided by the design-time service.
Returns
- PortalDbContext
An instance of PortalDbContext.