---
title: "Class ControllerEndpointExtensions"
slug: "sitecore.aspnet.renderingengine.localization.controllerendpointextensions"
abstract: ""
---
# Class ControllerEndpointExtensions

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

```csharp
public static class ControllerEndpointExtensions : Object

```

### Methods

#### MapSitecoreLocalizedRoute(IEndpointRouteBuilder, String, String, String)

Add default endpoint which supports language embedded prefixes. Like Http://localhost/da-DK/home.

##### Declaration

```csharp
public static IEndpointConventionBuilder MapSitecoreLocalizedRoute(this IEndpointRouteBuilder endpoints, string routeName, string action, string controller)

```

##### 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. |
