RequestDelegateRouteBuilderExtensions.MapMiddlewareRoute Method

Definition

Adds a route to the IRouteBuilder for the given template, and action.

C#
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapMiddlewareRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder builder, string template, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> action);

Parameters

template
String

The route template.

action
Action<IApplicationBuilder>

The action to apply to the IApplicationBuilder.

Returns

A reference to the builder after this operation has completed.

Applies to

Produk Versi
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0