ControllerEndpointRouteBuilderExtensions.MapDefaultControllerRoute 方法

定义

将控制器操作的终结点添加到 , 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

参数

返回

ControllerActionEndpointConventionBuilder与此路由的控制器操作关联的终结点的 。

适用于