共用方式為


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

參數

傳回

完成作業之後,這個執行個體的參考。

適用於