Entity Framework 无法从控制台应用程序迁移核心

Entity Framework Core migration from a console app not working

我正在编写一个简单的控制台应用程序来测试一些 EF Core 代码。

我添加了 entityframework.commands 包。

install-package entityframework.commands -pre

连接字符串是正确的并经过测试,但是当我执行

Update-Database 

我从包管理器收到以下错误。

No DbContext was found. Ensure that you're using the correct assembly and that the type is neither abstract nor generic.

我当然有上下文,项目中就一个

entityframework.commands是古代。请改用 Microsoft.EntityFrameworkCore.Tools