Table of Contents

Class EndpointRouteBuilderExtensions

Namespace
Umbraco.Extensions
Assembly
Umbraco.Web.Common.dll
public static class EndpointRouteBuilderExtensions
Inheritance
EndpointRouteBuilderExtensions
Inherited Members

Methods

MapUmbracoApiRoute(IEndpointRouteBuilder, Type, string, string?, bool, string, object?)

Used to map controllers as Umbraco API routes consistently

public static void MapUmbracoApiRoute(this IEndpointRouteBuilder endpoints, Type controllerType, string rootSegment, string? areaName, bool isBackOffice, string defaultAction = "Index", object? constraints = null)

Parameters

endpoints IEndpointRouteBuilder
controllerType Type
rootSegment string
areaName string
isBackOffice bool
defaultAction string
constraints object

MapUmbracoApiRoute<T>(IEndpointRouteBuilder, string, string, bool, string, object?)

Used to map controllers as Umbraco API routes consistently

public static void MapUmbracoApiRoute<T>(this IEndpointRouteBuilder endpoints, string rootSegment, string areaName, bool isBackOffice, string defaultAction = "Index", object? constraints = null) where T : ControllerBase

Parameters

endpoints IEndpointRouteBuilder
rootSegment string
areaName string
isBackOffice bool
defaultAction string
constraints object

Type Parameters

T

The ControllerBase type to route

MapUmbracoRoute(IEndpointRouteBuilder, Type, string, string?, string?, string, bool, object?)

Used to map Umbraco controllers consistently

public static void MapUmbracoRoute(this IEndpointRouteBuilder endpoints, Type controllerType, string rootSegment, string? areaName, string? prefixPathSegment, string defaultAction = "Index", bool includeControllerNameInRoute = true, object? constraints = null)

Parameters

endpoints IEndpointRouteBuilder
controllerType Type
rootSegment string
areaName string
prefixPathSegment string
defaultAction string
includeControllerNameInRoute bool
constraints object

MapUmbracoRoute<T>(IEndpointRouteBuilder, string, string, string?, string, bool, object?)

Used to map Umbraco controllers consistently

public static void MapUmbracoRoute<T>(this IEndpointRouteBuilder endpoints, string rootSegment, string areaName, string? prefixPathSegment, string defaultAction = "Index", bool includeControllerNameInRoute = true, object? constraints = null) where T : ControllerBase

Parameters

endpoints IEndpointRouteBuilder
rootSegment string
areaName string
prefixPathSegment string
defaultAction string
includeControllerNameInRoute bool
constraints object

Type Parameters

T

The ControllerBase type to route

MapUmbracoSurfaceRoute(IEndpointRouteBuilder, Type, string, string?, string, bool, object?)

public static void MapUmbracoSurfaceRoute(this IEndpointRouteBuilder endpoints, Type controllerType, string rootSegment, string? areaName, string defaultAction = "Index", bool includeControllerNameInRoute = true, object? constraints = null)

Parameters

endpoints IEndpointRouteBuilder
controllerType Type
rootSegment string
areaName string
defaultAction string
includeControllerNameInRoute bool
constraints object