我一直在尝试迁移一个名为IntegrationEventLogContext的上下文,它位于一个不同的层中,但是它得到了一个错误,上面写着;
"dotnet :无法执行,因为未找到指定的命令或文件“
我使用这个命令迁移上下文。
dotnet ef migrations add Initial -c IntegrationEventLogContext -p IntegrationEventLogEF -o Ordering.API/Infrastructure/IntegrationEventMigrations此外,我希望在我指定的位置创建迁移文件。

如何迁移上下文?
发布于 2022-05-05 02:14:48
我试图检查类似的问题,看起来dotnet工具不再是.NET Core的一部分。
您可以尝试执行以下步骤。
Administrator.
dotnet工具安装--全球dotnet-ef
运行下面的命令安装任何特定版本。
dotnet工具安装-全局dotnet-ef -版本{dotnetef_version}
参考资料:
https://stackoverflow.com/questions/72120112
复制相似问题