是否可以与传统的Entity Framework 6一起部署/安装Entity Framework Core 2.0?它是完全可能的,还是可能的,但有一些挂断,或者不可能?这是在某处记录的吗?我想我已经看到他们说他们设计的是并排,但我很难完全确认这一点。感谢。
答案 0 :(得分:1)
官方文件说明如下(见https://docs.microsoft.com/en-us/ef/efcore-and-ef6/side-by-side)。
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。我自己在一些简单的案例中完成了这项工作并且工作正常。