相关疑难解决方法(0)

在.NET Core 3中找不到dotnet ef

我正在关注文档以创建初始迁移。执行时dotnet,我得到了帮助部分,这意味着PATH可以正常工作。

然后,我尝试从控制台窗口的文档中执行以下命令:

dotnet ef migrations add InitialCreate  
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Could not execute because the specified command or file was not found.  
Possible reasons for this include:  
  * You misspelled a built-in dotnet command.  
  * You intended to execute a .NET Core program, but dotnet-ef does not exist.  
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Run Code Online (Sandbox Code Playgroud)
  • 自从复制命令以来,我排除了第一项。
  • 由于安装了软件包Microsoft.EntityFrameworkCore.SqlServer,因此我排除了第二项。
  • 我排除了第三项,因为调用dotnet时会获得帮助部分。

我正在搜索该问题,但是由于该版本是新版本,因此没有太多工作要做,并且/或者它淹没了早期版本中的类似问题。 …

c# entity-framework-core .net-core asp.net-core .net-core-3.0

44
推荐指数
8
解决办法
1万
查看次数

我们可以从现有数据库的选定表中Scaffold DbContext吗?

与以前版本的Entity Framework一样,Entity Framework Core中是否可以仅对现有数据库的选定表进行反向工程,以便从中创建模型类.这个官方的ASP.NET站点反向设计整个数据库.过去,如本ASP.NET教程所示,如果您选择使用旧的EF,您只能对所选的表/视图进行反向工程.

asp.net-mvc entity-framework asp.net-mvc-scaffolding visual-studio-2015 asp.net-core

15
推荐指数
4
解决办法
2万
查看次数