Skip to main content

Definition

Assembly: Microsoft.AspNetCore.Routing.dll Namespace: Microsoft.AspNetCore.Routing

Syntax

Summary

This type is defined in Microsoft.AspNetCore.Routing.

Remarks

See Microsoft documentation for more information about the rest of the API.

Methods

AddMcp Extension

Extension method from Microsoft.AspNetCore.Routing.ODataMcp_AspNetCore_RouteBuilderExtensions
Adds MCP endpoints to an OData route using the default path.

Syntax

Parameters

Returns

Type: Microsoft.AspNetCore.Routing.IRouteBuilder The route builder for chaining.

Examples

Remarks

This method adds MCP endpoints as siblings to the OData $metadata endpoint. For example, if the OData route is “api/v1”, the MCP endpoints will be at “api/v1/mcp”.

AddMcp Extension

Extension method from Microsoft.AspNetCore.Routing.ODataMcp_AspNetCore_RouteBuilderExtensions
Adds MCP endpoints to an OData route using a custom path.

Syntax

Parameters

Returns

Type: Microsoft.AspNetCore.Routing.IRouteBuilder The route builder for chaining.

Exceptions

Examples