EFMigrationResource Constructors
ClassConstructors2 members
Represents an EF Core migration resource associated with a project.
Constructor(string, ProjectResource, string?) Section titled Constructor(string, ProjectResource, string?) Initializes a new instance of the
EFMigrationResource class. public class EFMigrationResource{ public EFMigrationResource( string name, ProjectResource projectResource, string? dbContextTypeName) { // ... }}Parameters
namestringThe name of the resource.projectResource ProjectResource The startup project resource that contains the DbContext.dbContextTypeName string?The fully qualified name of the DbContext type, or null to auto-detect.Constructor(string, IDotnetProgramResource, string?) Section titled Constructor(string, IDotnetProgramResource, string?) Initializes a new instance of the
EFMigrationResource class for a .NET program resource. public class EFMigrationResource{ public EFMigrationResource( string name, IDotnetProgramResource startupProjectResource, string? dbContextTypeName) { // ... }}Parameters
namestringThe name of the resource.startupProjectResource IDotnetProgramResource The startup .NET program resource that contains the DbContext configuration.dbContextTypeName string?The fully qualified name of the DbContext type, or null to auto-detect.Exceptions
ArgumentNullExceptionstartupProjectResource is null.Remarks
This constructor captures resource data only. Use
AddEFMigrations on a startup project builder to register the resource and configure its tools, commands, relationships, and publishing pipeline.