ControllerEndpointRouteBuilderExtensions.MapDefaultControllerRoute 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將控制器動作的端點新增至 IEndpointRouteBuilder ,並新增預設路由 {controller=Home}/{action=Index}/{id?}
。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::ControllerActionEndpointConventionBuilder ^ MapDefaultControllerRoute(Microsoft::AspNetCore::Routing::IEndpointRouteBuilder ^ endpoints);
public static Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder MapDefaultControllerRoute (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints);
static member MapDefaultControllerRoute : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder -> Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder
<Extension()>
Public Function MapDefaultControllerRoute (endpoints As IEndpointRouteBuilder) As ControllerActionEndpointConventionBuilder
參數
- endpoints
- IEndpointRouteBuilder
傳回
, ControllerActionEndpointConventionBuilder 用於與此路由之控制器動作相關聯的端點。