如何从ASP.NET Core引用.NET框架 [英] How to reference .NET framework from ASP.NET Core

查看:215
本文介绍了如何从ASP.NET Core引用.NET框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要升级到ASP.NET Core的ASP.NET MVC 5/.NET 4.7项目.

I have a ASP.NET MVC 5 / .NET 4.7 project that I want to upgrade to ASP.NET Core.

MVC前端引用了服务层项目(SL),该服务层项目中使用了使用实体框架构建的数据层(DAL)项目.

The MVC frontend references a service layer project (SL) which in its that uses a datalayer (DAL) project built using Entity Framework.

我们的评估是,Entity Framework Core仍然缺少我们需要的功能,我们不应该将DAL项目升级到.NET Core.

Our assessment is that Entity Framework Core is still missing features that we need and that we should not upgrade the DAL project to .NET Core.

我的项目应该以什么框架为目标而能够协同工作?我们能否仅将一个项目升级到.NET Core,并将其余项目保留在.NET Framework中?

What framework should my projects target to be able to work together? Can we upgrade just one project to .NET Core and keep the rest in .NET Framework?

推荐答案

如果要切换到.NETCore并仍然能够使用较旧的库,则应标记.NETFramework.
因此,在创建新项目时,请选择:

If you want to switch to .NETCore and still be able to use older libraries you should tagret .NETFramework.
So when creating new project select:

ASP.NET核心Web应用程序(.NET Framework)

ASP.NET Core Web Application (.NET Framework)

此外,本月(实际上是昨天)发布了.NETCore 2.0和EFCore 2.0. 这两个框架都具有更多功能,因此我建议迁移到2.0项目.
此外,EFCore 2.0现在应该具有所需的大多数功能,因此我也将继续使用它.

In addition this month(actually yesterday) .NETCore 2.0 along with EFCore 2.0 is released. Both frameworks have much more features, so I suggest migrating to 2.0 project.
Also EFCore 2.0 should now have most features that were needed so I would go with that as well.

这篇关于如何从ASP.NET Core引用.NET框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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