且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在ASP.NET Core中使用实体框架6

更新时间:2023-02-15 20:32:11

不可能.您提供的相同链接可以确认:

It will be not possible. The same link you provided confirm that:

要使用Entity Framework 6,您的项目必须针对.NET Framework进行编译,因为Entity Framework 6不支持.NET Core.如果您需要跨平台功能,则需要升级到Entity Framework Core.

To use Entity Framework 6, your project has to compile against .NET Framework, as Entity Framework 6 does not support .NET Core. If you need cross-platform features you will need to upgrade to Entity Framework Core.

您可以在.NET Framework(不是.NET CORE)和EF6(但不能跨平台)上使用ASP.NET Core.但不是基于.NET Core的ASP.NET Core,而是使用EF6.您将需要对该项目使用EF Core.

You can use ASP.NET Core upon .NET Framework (Not .NET CORE) and EF6 (But not cross-platform). But not ASP.NET Core upon .NET Core and use EF6. You will need to use EF Core for that project.