MvcApplicationBuilderExtensions.UseMvcWithDefaultRoute 方法

定义

将 MVC 添加到请求执行管道, IApplicationBuilder 其中包含名为“default”的默认路由和以下模板:“{controller=Home}/{action=Index}/{id?}”。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseMvcWithDefaultRoute(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMvcWithDefaultRoute (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseMvcWithDefaultRoute : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseMvcWithDefaultRoute (app As IApplicationBuilder) As IApplicationBuilder

参数

返回

IApplicationBuilder

完成操作后对此实例的引用。

适用于