MigrationsScaffolderDependencies 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
MigrationsScaffolderDependencies(ICurrentDbContext, IModel, IMigrationsAssembly, IMigrationsModelDiffer, IMigrationsIdGenerator, IMigrationsCodeGenerator, IHistoryRepository, IOperationReporter, IDatabaseProvider, ISnapshotModelProcessor)
为 MigrationsScaffolder创建服务依赖项参数对象。
请勿直接从提供程序或应用程序代码调用此构造函数,因为它可能会在添加新依赖项时更改。 相反,请在构造函数中使用此类型,以便依赖项注入容器自动创建和注入实例。 若要创建替换了一些依赖服务的实例,请先解析依赖项注入容器中的 对象,然后使用“With...”替换所选服务方法。 请勿在此进程中的任何时间点调用构造函数。
此 API 支持 Entity Framework Core 基础结构,不应直接从代码使用。 将来的版本中可能会更改或删除此 API。
public MigrationsScaffolderDependencies (Microsoft.EntityFrameworkCore.Internal.ICurrentDbContext currentDbContext, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.IMigrationsAssembly migrationsAssembly, Microsoft.EntityFrameworkCore.Migrations.IMigrationsModelDiffer migrationsModelDiffer, Microsoft.EntityFrameworkCore.Migrations.IMigrationsIdGenerator migrationsIdGenerator, Microsoft.EntityFrameworkCore.Migrations.Design.IMigrationsCodeGenerator migrationCodeGenerator, Microsoft.EntityFrameworkCore.Migrations.IHistoryRepository historyRepository, Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter operationReporter, Microsoft.EntityFrameworkCore.Storage.IDatabaseProvider databaseProvider, Microsoft.EntityFrameworkCore.Migrations.Internal.ISnapshotModelProcessor snapshotModelProcessor);
new Microsoft.EntityFrameworkCore.Migrations.Design.MigrationsScaffolderDependencies : Microsoft.EntityFrameworkCore.Internal.ICurrentDbContext * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.IMigrationsAssembly * Microsoft.EntityFrameworkCore.Migrations.IMigrationsModelDiffer * Microsoft.EntityFrameworkCore.Migrations.IMigrationsIdGenerator * Microsoft.EntityFrameworkCore.Migrations.Design.IMigrationsCodeGenerator * Microsoft.EntityFrameworkCore.Migrations.IHistoryRepository * Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter * Microsoft.EntityFrameworkCore.Storage.IDatabaseProvider * Microsoft.EntityFrameworkCore.Migrations.Internal.ISnapshotModelProcessor -> Microsoft.EntityFrameworkCore.Migrations.Design.MigrationsScaffolderDependencies
Public Sub New (currentDbContext As ICurrentDbContext, model As IModel, migrationsAssembly As IMigrationsAssembly, migrationsModelDiffer As IMigrationsModelDiffer, migrationsIdGenerator As IMigrationsIdGenerator, migrationCodeGenerator As IMigrationsCodeGenerator, historyRepository As IHistoryRepository, operationReporter As IOperationReporter, databaseProvider As IDatabaseProvider, snapshotModelProcessor As ISnapshotModelProcessor)
参数
- currentDbContext
- Microsoft.EntityFrameworkCore.Internal.ICurrentDbContext
当前 DbContext。
- model
- IModel
模型。
- migrationsAssembly
- IMigrationsAssembly
迁移程序集。
- migrationsModelDiffer
- IMigrationsModelDiffer
迁移模型不同。
- migrationsIdGenerator
- IMigrationsIdGenerator
迁移 ID 生成器。
- migrationCodeGenerator
- IMigrationsCodeGenerator
迁移代码生成器。
- historyRepository
- IHistoryRepository
历史记录存储库。
- operationReporter
- Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter
操作记者。
- databaseProvider
- IDatabaseProvider
数据库提供程序。
- snapshotModelProcessor
- Microsoft.EntityFrameworkCore.Migrations.Internal.ISnapshotModelProcessor
快照模型处理器。
适用于
MigrationsScaffolderDependencies(ICurrentDbContext, IModel, IMigrationsAssembly, IMigrationsModelDiffer, IMigrationsIdGenerator, IMigrationsCodeGeneratorSelector, IHistoryRepository, IOperationReporter, IDatabaseProvider, ISnapshotModelProcessor, IMigrator)
这是一个支持 Entity Framework Core 基础结构的内部 API,不受与公共 API 相同的兼容性标准的约束。 可能会在任何版本中更改或删除它,恕不另行通知。 应仅在代码中直接使用它,并且非常谨慎,并且知道在更新到新的 Entity Framework Core 版本时,这样做可能会导致应用程序失败。
[Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal]
public MigrationsScaffolderDependencies (Microsoft.EntityFrameworkCore.Infrastructure.ICurrentDbContext currentContext, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.IMigrationsAssembly migrationsAssembly, Microsoft.EntityFrameworkCore.Migrations.IMigrationsModelDiffer migrationsModelDiffer, Microsoft.EntityFrameworkCore.Migrations.IMigrationsIdGenerator migrationsIdGenerator, Microsoft.EntityFrameworkCore.Migrations.Design.IMigrationsCodeGeneratorSelector migrationsCodeGeneratorSelector, Microsoft.EntityFrameworkCore.Migrations.IHistoryRepository historyRepository, Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter operationReporter, Microsoft.EntityFrameworkCore.Storage.IDatabaseProvider databaseProvider, Microsoft.EntityFrameworkCore.Migrations.Internal.ISnapshotModelProcessor snapshotModelProcessor, Microsoft.EntityFrameworkCore.Migrations.IMigrator migrator);
[<Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal>]
new Microsoft.EntityFrameworkCore.Migrations.Design.MigrationsScaffolderDependencies : Microsoft.EntityFrameworkCore.Infrastructure.ICurrentDbContext * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.IMigrationsAssembly * Microsoft.EntityFrameworkCore.Migrations.IMigrationsModelDiffer * Microsoft.EntityFrameworkCore.Migrations.IMigrationsIdGenerator * Microsoft.EntityFrameworkCore.Migrations.Design.IMigrationsCodeGeneratorSelector * Microsoft.EntityFrameworkCore.Migrations.IHistoryRepository * Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter * Microsoft.EntityFrameworkCore.Storage.IDatabaseProvider * Microsoft.EntityFrameworkCore.Migrations.Internal.ISnapshotModelProcessor * Microsoft.EntityFrameworkCore.Migrations.IMigrator -> Microsoft.EntityFrameworkCore.Migrations.Design.MigrationsScaffolderDependencies
Public Sub New (currentContext As ICurrentDbContext, model As IModel, migrationsAssembly As IMigrationsAssembly, migrationsModelDiffer As IMigrationsModelDiffer, migrationsIdGenerator As IMigrationsIdGenerator, migrationsCodeGeneratorSelector As IMigrationsCodeGeneratorSelector, historyRepository As IHistoryRepository, operationReporter As IOperationReporter, databaseProvider As IDatabaseProvider, snapshotModelProcessor As ISnapshotModelProcessor, migrator As IMigrator)
参数
- currentContext
- ICurrentDbContext
- model
- IModel
- migrationsAssembly
- IMigrationsAssembly
- migrationsModelDiffer
- IMigrationsModelDiffer
- migrationsIdGenerator
- IMigrationsIdGenerator
- migrationsCodeGeneratorSelector
- IMigrationsCodeGeneratorSelector
- historyRepository
- IHistoryRepository
- operationReporter
- Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter
- databaseProvider
- IDatabaseProvider
- snapshotModelProcessor
- Microsoft.EntityFrameworkCore.Migrations.Internal.ISnapshotModelProcessor
- migrator
- IMigrator
- 属性
注解
请勿直接从提供程序或应用程序代码调用此构造函数,因为它可能会在添加新依赖项时更改。 相反,请在构造函数中使用此类型,以便依赖项注入容器自动创建和注入实例。 若要创建替换了某些依赖服务的实例,请先从依赖项注入容器解析对象,然后使用 C# “with” 运算符替换所选服务。 请勿在此进程中的任何时间点调用构造函数。
适用于
MigrationsScaffolderDependencies(ICurrentDbContext, IModel, IMigrationsAssembly, IMigrationsModelDiffer, IMigrationsIdGenerator, IMigrationsCodeGeneratorSelector, IHistoryRepository, IOperationReporter, IDatabaseProvider, ISnapshotModelProcessor, IMigrator)
为 MigrationsScaffolder创建服务依赖项参数对象。
请勿直接从提供程序或应用程序代码调用此构造函数,因为它可能会在添加新依赖项时更改。 相反,请在构造函数中使用此类型,以便依赖项注入容器自动创建和注入实例。 若要创建替换了一些依赖服务的实例,请先解析依赖项注入容器中的 对象,然后使用“With...”替换所选服务方法。 请勿在此进程中的任何时间点调用构造函数。
此 API 支持 Entity Framework Core 基础结构,不应直接从代码使用。 将来的版本中可能会更改或删除此 API。
public MigrationsScaffolderDependencies (Microsoft.EntityFrameworkCore.Internal.ICurrentDbContext currentDbContext, Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Migrations.IMigrationsAssembly migrationsAssembly, Microsoft.EntityFrameworkCore.Migrations.IMigrationsModelDiffer migrationsModelDiffer, Microsoft.EntityFrameworkCore.Migrations.IMigrationsIdGenerator migrationsIdGenerator, Microsoft.EntityFrameworkCore.Migrations.Design.IMigrationsCodeGeneratorSelector migrationsCodeGeneratorSelector, Microsoft.EntityFrameworkCore.Migrations.IHistoryRepository historyRepository, Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter operationReporter, Microsoft.EntityFrameworkCore.Storage.IDatabaseProvider databaseProvider, Microsoft.EntityFrameworkCore.Migrations.Internal.ISnapshotModelProcessor snapshotModelProcessor, Microsoft.EntityFrameworkCore.Migrations.IMigrator migrator);
new Microsoft.EntityFrameworkCore.Migrations.Design.MigrationsScaffolderDependencies : Microsoft.EntityFrameworkCore.Internal.ICurrentDbContext * Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Migrations.IMigrationsAssembly * Microsoft.EntityFrameworkCore.Migrations.IMigrationsModelDiffer * Microsoft.EntityFrameworkCore.Migrations.IMigrationsIdGenerator * Microsoft.EntityFrameworkCore.Migrations.Design.IMigrationsCodeGeneratorSelector * Microsoft.EntityFrameworkCore.Migrations.IHistoryRepository * Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter * Microsoft.EntityFrameworkCore.Storage.IDatabaseProvider * Microsoft.EntityFrameworkCore.Migrations.Internal.ISnapshotModelProcessor * Microsoft.EntityFrameworkCore.Migrations.IMigrator -> Microsoft.EntityFrameworkCore.Migrations.Design.MigrationsScaffolderDependencies
Public Sub New (currentDbContext As ICurrentDbContext, model As IModel, migrationsAssembly As IMigrationsAssembly, migrationsModelDiffer As IMigrationsModelDiffer, migrationsIdGenerator As IMigrationsIdGenerator, migrationsCodeGeneratorSelector As IMigrationsCodeGeneratorSelector, historyRepository As IHistoryRepository, operationReporter As IOperationReporter, databaseProvider As IDatabaseProvider, snapshotModelProcessor As ISnapshotModelProcessor, migrator As IMigrator)
参数
- currentDbContext
- Microsoft.EntityFrameworkCore.Internal.ICurrentDbContext
当前 DbContext。
- model
- IModel
模型。
- migrationsAssembly
- IMigrationsAssembly
迁移程序集。
- migrationsModelDiffer
- IMigrationsModelDiffer
迁移模型不同。
- migrationsIdGenerator
- IMigrationsIdGenerator
迁移 ID 生成器。
- migrationsCodeGeneratorSelector
- IMigrationsCodeGeneratorSelector
迁移代码生成器选择器。
- historyRepository
- IHistoryRepository
历史记录存储库。
- operationReporter
- Microsoft.EntityFrameworkCore.Design.Internal.IOperationReporter
操作记者。
- databaseProvider
- IDatabaseProvider
数据库提供程序。
- snapshotModelProcessor
- Microsoft.EntityFrameworkCore.Migrations.Internal.ISnapshotModelProcessor
快照模型处理器。
- migrator
- IMigrator
迁移程序。