使用不带MVC的ASP.NET Core [英] Use ASP.NET Core without MVC

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

问题描述

我想知道是否可以在没有MVC Core的情况下使用新的ASP.NET Core Framework.有没有关于如何在不集成整个MVC框架的情况下实现小型网页的示例?是否提供简单的路由剃刀页面?

I wonder if it is possible to use the new ASP.NET Core Framework without MVC Core. Are there any examples on how to achieve a small web page without integrating the whole MVC Framework? Serving simple routed razor pages?

推荐答案

是的,您可以使用 Razor页面代替完整的MVC项目.

Yes, you can use Razor pages instead of a complete MVC project.

此Microsoft简介解释了如何在没有整个MVC框架的情况下使用Razor页面及其最重要的功能.

This Microsoft introduction explains how to use Razor pages and its most important features without the whole MVC framework.

此页面使用以下句子来描述Razor页面:

This page uses the following sentences to decribe Razor pages:

作为.NET Core 2.0版本的一部分,ASP.NET也进行了一些更新.其中之一是添加了一个新的Web框架,用于创建页面",而没有ASP.NET MVC的全部复杂性.新的Razor页面是MVC框架的精简版本,从某种程度上讲,是旧的".aspx" WebForms的发展.

As part of the release of .NET Core 2.0, there are also some updates to ASP.NET. One of those is the addition of a new web framework for creating a "page" without the full complexity of ASP.NET MVC. New Razor Pages are a slimmer version of the MVC framework and in some ways an evolution of the old ".aspx" WebForms.

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

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