C# VS代码中的实体框架迁移

C# VS代码中的实体框架迁移,c#,entity-framework,asp.net-core,visual-studio-code,entity-framework-core,C#,Entity Framework,Asp.net Core,Visual Studio Code,Entity Framework Core,我在VisualStudio中应用EF迁移,但无法通过VS代码应用它们 1.以下脚本有什么问题 dotnet ef migrations enable-migrations -ContextTypeName Demo.ApplicationDbContext -MigrationsDirectory:Migrations dotnet ef migrations Add-Migration -configuration Demo.Migrations.Configuration Migratio

我在VisualStudio中应用EF迁移,但无法通过VS代码应用它们

1.以下脚本有什么问题

dotnet ef migrations enable-migrations -ContextTypeName Demo.ApplicationDbContext -MigrationsDirectory:Migrations
dotnet ef migrations Add-Migration -configuration Demo.Migrations.Configuration Migration_Initial
dotnet ef migrations Update-Database -configuration Demo.Migrations.Configuration
2.VS代码中是否有类似PM控制台的功能


3.除了VS代码Treminal或CLI之外,我还可以通过cmd应用这些脚本吗?

在VS代码中,您可以在终端窗口中使用CLI或powershell。这些命令的语法略有不同。看起来您在示例中混合了powershell语法和CLI语法。例如,对于添加迁移,CLI语法为

dotnet ef migrations add Migration_Initial --configuration Demo.Migrations.Configuration

您看到了哪些错误消息?