asp.net-mvc ASP.NET MVC 6 的特性是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24533380/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 03:45:14  来源:igfitidea点击:

What are the ASP.NET MVC 6 Features?

asp.net-mvc

提问by Amit Prajapati

Can anybody tell me what are the new features available in ASP.NET MVC 6.0? And what is the very nice feature which insist me to migrate my project MVC 5.0 to MVC 6.0?

谁能告诉我 ASP.NET MVC 6.0 中有哪些新功能?坚持我将我的项目 MVC 5.0 迁移到 MVC 6.0 的非常好的功能是什么?

采纳答案by Sam

This is the best list I found that answered a few of my questions:

这是我发现的最好的列表,它回答了我的一些问题:

http://www.dotnet-tricks.com/Tutorial/mvc6/5R9E190514-Introduction-to-ASP.NET-vNext-and-MVC-6.html

http://www.dotnet-tricks.com/Tutorial/mvc6/5R9E190514-Introduction-to-ASP.NET-vNext-and-MVC-6.html

Here is a summary of the 10 features they covered:

以下是他们涵盖的 10 个功能的摘要:

  • Cloud optimized versions of MVC, Web API, Web Pages, SignalR, and EF
  • MVC, Web API and Web Pages merged into one framework (MVC6)
  • No dependency on System.Web (HttpContext object graph drops from ~30k/req to ~2k/req)
  • New project extension project.jsonto list all dependencies and a Startupclass that replaces global.asax
  • Cloud ready by design. Session state and caching adjust behavior depending on hosting environment.
  • Host agnostic
  • True Side-by-side deployment. Just upload dependencies to the bin directory without affecting other apps on same server.
  • Dependency injection built in
  • Roslyn compiler for dynamic code compilation. Edit code and see changes without having to rebuild
  • Open source and cross-platform (can work on Mono, Mac, Linux, etc)
  • MVC、Web API、Web Pages、SignalR 和 EF 的云优化版本
  • MVC、Web API 和网页合并为一个框架 (MVC6)
  • 不依赖 System.Web(HttpContext 对象图从 ~30k/req 下降到 ~2k/req)
  • project.json用于列出所有依赖项和Startup替换 global.asax的类的新项目扩展
  • 云设计就绪。会话状态和缓存根据托管环境调整行为。
  • 主机不可知论者
  • 真正的并行部署。只需将依赖项上传到 bin 目录,而不会影响同一服务器上的其他应用程序。
  • 依赖注入内置
  • Roslyn 编译器用于动态代码编译。无需重新构建即可编辑代码并查看更改
  • 开源和跨平台(可以在 Mono、Mac、Linux 等上工作)

回答by shankar.parshimoni

The best featues in MVC6

MVC6 中的最佳功能

  1. Asp MVC 6 added new cloud computing optimization system of MVC, web API, SignalR and entity framework.
  2. Microsoft removed the dependency of system.web.dll from MVC 6 because it's so expensive. Typically it consumes 30K memory per request/response. Right now, in MVC 6 consume 2K memory per request response. It's too small memory consume.
  3. The Microsoft make a bundle of MVC, Web API, WebPages, Signal, That bundle we called MVC 6.
  4. Most of the problem solved using the Roslyn Compiler.
  5. The ASP .Net vNext used the Roslyn Compiler, by using Roslyn compiler do not need to compile the application its compile automatically the application code.
  6. The .Net vNext has the new project extension project.json. Basically project. json contains the all dependency dll of the application.
  7. In MVC 5.1 and 5.2 supports to Enum and EnumHelper in razor views.
  8. The .Net vNext is a cross platform and open source.
  1. Asp MVC 6 新增了MVC、Web API、SignalR和实体框架的云计算优化系统。
  2. 微软从 MVC 6 中删除了 system.web.dll 的依赖,因为它太昂贵了。通常每个请求/响应消耗 30K 内存。现在,在 MVC 6 中,每个请求响应消耗 2K 内存。内存消耗太小了。
  3. 微软捆绑了 MVC、Web API、WebPages、Signal,我们称之为 MVC 6。
  4. 使用 Roslyn 编译器解决了大部分问题。
  5. ASP .Net vNext 使用了 Roslyn Compiler,通过使用 Roslyn 编译器不需要编译应用程序,其自动编译应用程序代码。
  6. .Net vNext 具有新的项目扩展 project.json。基本上是项目。json 包含应用程序的所有依赖项 dll。
  7. 在 MVC 5.1 和 5.2 中,在剃刀视图中支持 Enum 和 EnumHelper。
  8. .Net vNext 是一个跨平台的开源软件。

回答by Anil Sharma

I have posted at my blog in details, please check out.

我已经在我的博客中详细发布了,请查看。

  1. Web Forms, MVC 5, Web API 2, Web Pages 3, SignalR 2, EF 6, Identity 2 will be fully supported on .NET vNext.
  2. MVC, Web API, Web Pages 6, SignalR 3, EF 7, Identity 3
  3. MVC, Web API and Web Pages have been merged into a single framework MVC 6. For example, there's now unified controller and routing concepts between all three.
  4. New project system
  5. New configuration system
  6. No System.Web, new lightweight HttpContext (not System.Net.Http)
  7. We will have a migration tool which will help you migrate your application to use ASP.NET vNext on .NET vNext and cloud optimized .NET vNext. This will cover scenarios such as migrating from MVC 5 to 6 and more.
  1. .NET vNext 将完全支持 Web Forms、MVC 5、Web API 2、Web Pages 3、SignalR 2、EF 6、Identity 2。
  2. MVC、Web API、网页 6、SignalR 3、EF 7、身份 3
  3. MVC、Web API 和 Web Pages 已合并为一个单一的框架 MVC 6。例如,现在这三者之间有了统一的控制器和路由概念。
  4. 新项目系统
  5. 新的配置系统
  6. 没有 System.Web,新的轻量级 HttpContext(不是 System.Net.Http)
  7. 我们将提供一个迁移工具,可帮助您迁移应用程序以在 .NET vNext 和云优化的 .NET vNext 上使用 ASP.NET vNext。这将涵盖诸如从 MVC 5 迁移到 6 等场景。

http://www.dotnet-stuff.com/tutorials/aspnet-vnext/asp-net-vnext-overview-and-features-mvc6-web-api-web-pages-and-single-r

http://www.dotnet-stuff.com/tutorials/aspnet-vnext/asp-net-vnext-overview-and-features-mvc6-web-api-web-pages-and-single-r