Langue

OperationExecutor.AddAndApplyMigration Constructor

Definition

Initializes a new instance of the OperationExecutor.AddAndApplyMigration class.

public AddAndApplyMigration(Microsoft.EntityFrameworkCore.Design.OperationExecutor executor, Microsoft.EntityFrameworkCore.Design.IOperationResultHandler resultHandler, System.Collections.IDictionary args);
new Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddAndApplyMigration : Microsoft.EntityFrameworkCore.Design.OperationExecutor * Microsoft.EntityFrameworkCore.Design.IOperationResultHandler * System.Collections.IDictionary -> Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddAndApplyMigration
Public Sub New (executor As OperationExecutor, resultHandler As IOperationResultHandler, args As IDictionary)

Parameters

executor
OperationExecutor

The operation executor.

args
IDictionary

The operation arguments.

Remarks

The arguments supported by args are:

name--The name of the migration.

outputDir--The directory to put files in. Paths are relative to the project directory.

contextType--The DbContext to use.

namespace--The namespace to use for the migration.

connectionString--The connection string to the database. Defaults to the one specified in Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.AddDbContext or OnConfiguring(DbContextOptionsBuilder).

Applies to