Definition
Assembly: Microsoft.OData.Mcp.AspNetCore.dll Namespace: Microsoft.OData.Mcp.AspNetCore.Routing Inheritance: System.ObjectSyntax
Summary
Automatically adds MCP endpoints to OData routes during registration.Remarks
This convention ensures that for each OData route registered, corresponding MCP endpoints are automatically created as siblings to the $metadata endpoint.Constructors
.ctor
Initializes a new instance of the ODataMcpRouteConvention class.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
options | Microsoft.Extensions.Options.IOptions<Microsoft.OData.Mcp.Core.ODataMcpOptions> | The MCP options. |
endpointRegistry | Microsoft.OData.Mcp.Core.Routing.IMcpEndpointRegistry | The MCP endpoint registry. |
Exceptions
| Exception | Description |
|---|---|
ArgumentNullException | Thrown when required parameters are null. |
.ctor Inherited
Inherited from
objectSyntax
Methods
ApplyConvention
Applies MCP conventions to the endpoint route builder.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
endpointRouteBuilder | Microsoft.AspNetCore.Routing.IEndpointRouteBuilder | The endpoint route builder. |
routePrefix | string | The OData route prefix. |
routeName | string | The OData route name. |
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
Related APIs
- Microsoft.OData.Mcp.AspNetCore.Routing.IMcpRouteConvention