entity-framework - 与 EF 6 一起部署 Entity Framework Core 2.0?

标签 entity-framework entity-framework-core

是否可以与传统 Entity Framework 6 一起部署/安装 Entity Framework Core 2.0?这是完全可能的,还是可能但有一些困难,还是不可能?这有记录在某处吗?我想我已经看到他们说他们将其设计为并排的,但我很难完全确认这一点。谢谢。

最佳答案

official documentation说如下:

It is possible to use EF Core and EF6 in the same application. EF Core and EF6 have the same type names that differ only by namespace, so this may complicate code that attempts to use both EF Core and EF6 in the same code file.

If you are porting an existing application that has multiple EF models, then you can selectively port some of them to EF Core, and continue using EF6 for the others.

这当然意味着您可以在同一个项目中安装 EF6 和 EF Core。我自己在一些简单的案例中做到了这一点,并且工作正常。

关于entity-framework - 与 EF 6 一起部署 Entity Framework Core 2.0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46536482/

相关文章:

c# - DbContext 动态映射表

c# - Where 子句中包含 ".Any"的动态 Linq (C#/.Net Core/EF Core)

c# - 如何防止 NServiceBus 回滚事务或事务的一部分?

c# - 如何重试与 ASP.NET Core、EF Core 的乐观并发冲突?

asp.net-identity - EF7 身份未加载用户扩展属性

c# - EF Core DeleteBehavior.SetNull 造成循环问题

c# - JSON Serializer 尝试访问早已消失的 EntityFramework 上下文,以获取我没有要求或不关心的数据

c# - Entity Framework 7 中表和属性的名称不区分大小写

c# - Entity Framework 核心 : Update relation with Id only without extra call

c# - 多对多自引用关系