2016-05-23 60 views

回答

1

我认为你的问题是你使用class library项目。在EF Core的RC2中,您不能将DBContext放置在这样的项目中。这是一个已知的问题。当您将其转换为“应用程序”项目时,它应该再次运行。

更多信息&来源:

解决方法:https://docs.efproject.net/en/latest/cli/dotnet.html#dotnet-cli-issues

Github的问题: https://github.com/aspnet/EntityFramework/issues/5460

乐于助人的链接,从升级到RC1 RC2:https://docs.efproject.net/en/latest/miscellaneous/rc1-rc2-upgrade.html