IMigrationCommandExecutor 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
用于针对数据库执行迁移命令的服务。
public interface IMigrationCommandExecutor
type IMigrationCommandExecutor = interface
Public Interface IMigrationCommandExecutor
注解
服务生存期为 Scoped。 这意味着每个 DbContext 实例都将使用此服务自己的实例。 实现可能依赖于注册到任何生存期的其他服务。 实现不需要线程安全。
有关详细信息和示例,请参阅 数据库迁移 。