在Core 2 Web应用程序中使用Core 1库 [英] Using Core 1 library in Core 2 web app

查看:55
本文介绍了在Core 2 Web应用程序中使用Core 1库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个使用Entity Framework 1开发的库,作为本地NuGet包分发。我们有一个使用该库的应用程序,该库正在升级到Entity Framework 2.当Web应用程序下载NuGet包时,使用Entity Framework 2.0版本
并编译所有内容。但是,我们遇到了运行时错误,因为库使用了与2.0不兼容的EF版本。

We have a library developed using Entity Framework 1, distributed as a local NuGet package. We have an application using that library, which is being upgraded to Entity Framework 2. When the web app downloads the NuGet packages, Entity Framework 2.0 version is used and everything compiles. However, we're getting runtime errors because the library uses a version of EF that's not compatible with 2.0.

有没有解决方法或我们是否需要升级库以便升级Web应用程序?

Is there a way around this or do we need to upgrade the library in order to upgrade the web app?

推荐答案

所以你所说的是EF不在DAL中,因此Web应用程序不会关心正在使用哪个版本的EF? 

So what you are saying is that EF is not in a DAL so that the Web application wouldn't care what version of EF is being used? 

此外,应用程序未使用远离底层ORM或底层数据库技术的抽象DTO,因此Web应用程序也不会关心数据库技术或ORM,因为它与ORM或底层数据库技术没有直接联系

Also that the application is not using DTO(s) that would be an abstraction away from the underlying ORM or underlying DB technology so that again, the Web application wouldn't care what the DB technology is about or ORM, because it is not in direct contact with the ORM or underlying DB technology.

这个ASP.NET是什么类型的Web应用程序MVC,Web表单,Web服务还是什么?

What kind of Web application is this ASP.NET MVC, Web form,  Web service or what?


这篇关于在Core 2 Web应用程序中使用Core 1库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆