OperationExecutor.AddAndApplyMigration 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 OperationExecutor.AddAndApplyMigration 类的新实例。
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)
参数
- executor
- OperationExecutor
操作执行程序。
- resultHandler
- IOperationResultHandler
- args
- IDictionary
操作参数。
注解
支持 args 的参数包括:
name--迁移的名称。
outputDir--要在其中放置文件的目录。 路径相对于项目目录。
contextType--要使用的 DbContext 。
namespace--要用于迁移的命名空间。
connectionString--数据库连接字符串。 默认为 Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.AddDbContext 或 OnConfiguring(DbContextOptionsBuilder) 中指定的值。