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