Class ControllerEndpointExtensions
Version: 21.x
Contains extension methods for using Controllers with Microsoft.AspNetCore.Routing.IEndpointRouteBuilder.
Inheritance
System.Object
ControllerEndpointExtensions
Namespace: Sitecore.AspNet.RenderingEngine.Localization
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
Methods
MapSitecoreLocalizedRoute(IEndpointRouteBuilder, String, String, String)
Add default endpoint which supports language embedded prefixes. Like Http://localhost/da-DK/home.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Routing.IEndpointRouteBuilder | endpoints | Microsoft.AspNetCore.Routing.IEndpointRouteBuilder parameter. |
| System.String | routeName | Name of the route. |
| System.String | action | Default action. |
| System.String | controller | Default controller. |
Returns
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Builder.IEndpointConventionBuilder | An Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder for endpoints associated with controller actions for this route. |
If you have suggestions for improving this article, let us know!