Table of Contents

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
object
DesignTimeDbContextFactory

Methods

CreateDbContext(string[])

Creates a new instance of a derived context.

public PortalDbContext CreateDbContext(string[] args)

Parameters

args string[]

Arguments provided by the design-time service.

Returns

PortalDbContext

An instance of PortalDbContext.