Microsoft just announced实体框架Core 2.0现在将运行在.NET Standard 2.0上。.NET 4.6.1上的Entity Framework Core 2.0
.Net Standard 2.0与.NET Framework 4.6.1兼容(如果这是正确的话)。
然而,当我尝试添加latest NuGet package我得到一个错误,告诉我,我使用了错误的版本:
Install-Package : Could not install package
'Microsoft.EntityFrameworkCore.SqlServer 2.0.0-preview2-25332'. You are
trying to install this package into a project that targets
'.NETFramework,Version=v4.6.1', but
the package does not contain any assembly references or content files
that are compatible with that framework.
如果根据公告,我可以使用EF核心2.0和.NET框架4.6。 1,请有人解释一下,如果可能的话,举一个例子,看看会是什么样子。
建议你在这里报告的一个问题:https://github.com/aspnet/EntityFramework/issues – ErikEJ