Freigeben über


MigrationsScaffolder Class

Definition

Used to scaffold new migrations.

public class MigrationsScaffolder
public class MigrationsScaffolder : Microsoft.EntityFrameworkCore.Migrations.Design.IMigrationsScaffolder
type MigrationsScaffolder = class
type MigrationsScaffolder = class
    interface IMigrationsScaffolder
Public Class MigrationsScaffolder
Public Class MigrationsScaffolder
Implements IMigrationsScaffolder
Inheritance
MigrationsScaffolder
Implements

Remarks

See Database migrations, and EF Core design-time services for more information and examples.

Constructors

MigrationsScaffolder(ICurrentDbContext, IModel, IMigrationsAssembly, IMigrationsModelDiffer, IMigrationsIdGenerator, MigrationsCodeGenerator, IHistoryRepository, ILogger<MigrationsScaffolder>, IDatabaseProviderServices)
MigrationsScaffolder(MigrationsScaffolderDependencies)

Initializes a new instance of the MigrationsScaffolder class.

Properties

Dependencies

Dependencies for this service.

Methods

GetDirectory(String, String, String)

Gets the directory of a sibling file. If none, the directory corresponding to the sub-namespace is used.

GetNamespace(Type, String)

Gets the namespace of a sibling type. If none, the default namespace is used.

GetSubNamespace(String, String)

Gets a sub-namespace.

RemoveMigration(String, String, Boolean, Boolean)

Removes the previous migration.

RemoveMigration(String, String, Boolean, String, Boolean)

Removes the previous migration.

RemoveMigration(String, String, Boolean, String)

Removes the previous migration.

RemoveMigration(String, String, Boolean)

Removes the previous migration.

Save(String, ScaffoldedMigration, String, Boolean)

Saves a scaffolded migration to files.

Save(String, ScaffoldedMigration, String)

Saves a scaffolded migration to files.

ScaffoldMigration(String, String, String, String, Boolean)

Scaffolds a new migration.

ScaffoldMigration(String, String, String, String)

Scaffolds a new migration.

ScaffoldMigration(String, String, String)

Scaffolds a new migration.

TryGetProjectFile(String, String)

Tries to find a file under the project directory.

Applies to