简体   繁体   English

ASP.NET MVC 5、ASP.NET Core MVC 5 有什么区别?

[英]What is the difference between ASP.NET MVC 5, ASP.NET Core MVC 5?

I know that .NET Core 3.1 is followed by .NET 5 (this is by itself .net core).我知道 .NET Core 3.1 之后是 .NET 5(这本身就是 .net 核心)。

I also know that .NET 4.8 is the last windows only (non .net core) framework.我也知道 .NET 4.8 是最后一个 windows (非 .net 核心)框架。

So I think that ASP.NET MVC 5, ASP.NET Core MVC 5 are both the same.所以我认为 ASP.NET MVC 5、ASP.NET Core MVC 5 都是一样的。 Is that correct?那是对的吗?

https://en.wikipedia.org/wiki/ASP.NET_MVC https://en.wikipedia.org/wiki/ASP.NET_MVC

ASP.NET MVC 1.0 was released on 13 March 2009, not part of the .NET Framework, running on top of ASP.NET, which was then part of .NET Framework 3.5. ASP.NET MVC 1.0 was released on 13 March 2009, not part of the .NET Framework, running on top of ASP.NET, which was then part of .NET Framework 3.5.

MVC's version did not correspond to .NET Framework/ASP.NET versioning. MVC 的版本与 .NET Framework/ASP.NET 版本不对应。 MVC went through version 2, 3 and 4 and ASP.NET MVC 5 was released on 17 October 2013. Meanwhile the .NET Framework went from 3.5 to 4.7, now 4.8 but will never reach a higher major version. MVC 经历了版本 2、3 和 4,ASP.NET MVC 5 于 2013 年 10 月 17 日发布。同时 .NET 框架从 3.5 到 4.7,现在是 4.8,但永远不会达到更高的主要版本。


Then .NET Core started under the working title "vNext".然后 .NET Core 在工作标题“vNext”下启动。 It was .NET Core 1, then 2, then 3. .NET Core includes ASP.NET Core, which included ASP.NET Core MVC.它是 .NET 核心 1,然后是 2,然后是 3。 .NET 核心包括 ASP.NET 核心,其中包括 Z9E0DA8438E76E38A8DZCE30 This versioned along with its framework.这与它的框架一起版本化。

Now to prevent confusion, they didn't want to name the fourth version of .NET Core as 4, because that'd conflict (not on a filesystem level, but in the heads of developers) with .NET Framework 4. So they unified .NET Framework and .NET Core, and called it .NET 5.现在为了防止混淆,他们不想将 .NET Core 的第四个版本命名为 4,因为这会与 .NET 框架 4 冲突(不是在文件系统级别,而是在开发人员的头脑中)。所以他们统一了 Z303CB0EF9EDB9082AZD61DBBBE5825 框架和 .NET Core,并称之为 .NET 5。


.NET 5 includes ASP.NET Core 5, which includes ASP.NET Core MVC 5, which is not the same as ASP.NET MVC 5. .NET 5 包括 ASP.NET 内核 5,其中包括 ASP.NET 内核 MVC 5,与Z9E0DA8443B576E73B8不同。

The old .NET Framework (currently 4.8) and ASP.NET MVC 5.2.7 are considered finished.旧的 .NET 框架(当前为 4.8)和 ASP.NET MVC 5.2.7 被认为已完成。 Maybe they'll receive security patches, but you shouldn't do new development in it, and skip tutorials that mention it.也许他们会收到安全补丁,但你不应该在其中进行新的开发,并跳过提到它的教程。

  • There are several difference between ASP.NET Core 5 and ASP.NET MVC 5 in the solution structure. ASP.NET Core 5 和 ASP.NET MVC 5 在解决方案结构上有几个区别。 The ASP.NET Core is a composable framework for implementing web and cloud based applications. ASP.NET 内核是一个可组合的框架,用于实现 web 和基于云的应用程序。
  • ASP .NET MVC 5 helps to choose the MVC or Web API and we can able to choose both while creating a web application. ASP .NET MVC 5 有助于选择 MVC 或 Web API,我们可以在创建 Z2567A5EC3705EB87 应用程序时同时选择两者。 But in Core we can able to choose single-aligned web stack for MVC nad Web API.但是在 Core 中,我们可以为 MVC 和 Web API 选择单对齐的 web 堆栈。
  • The file structure are varies between them.文件结构因它们而异。 the ASP.NET MVC 5 concicts of web.config, Global.asax files. ASP.NET MVC 5 个 web.config、Global.asax 文件的冲突。 But the Core does not contain these files instead it contains appsettings.json.但核心不包含这些文件,而是包含 appsettings.json。
  • And the ASP .NET Core does not need IIS for hosting since it is to be cross-platform and it is self hosted. ASP .NET Core 不需要 IIS 进行托管,因为它是跨平台的并且是自托管的。
  • In ASP.NET Core applications, dependency injection is inbuilt and no set up is needed for DI.在 ASP.NET 核心应用程序中,依赖注入是内置的,不需要对 DI 进行设置。 But in ASP.NET MVC we want to use saparate DI container and then build up the project to use DI.但是在 ASP.NET MVC 中,我们想使用单独的 DI 容器,然后构建项目以使用 DI。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM