Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.AspNetCore.dll Namespace: Microsoft.OData.Mcp.AspNetCore.Adaptation Inheritance: System.Object

Syntax

Summary

Copies declared IEdmModel members into the Core EDM projection. CLR properties ignored on the OData model are never copied.

Methods

ToCoreModel

Projects an IEdmModel into the Core EDM used by catalogs.

Syntax

Parameters

Returns

Type: Microsoft.OData.Mcp.Core.Models.EdmModel The Core projection containing only declared members and vocabulary documentation.

ToCsdlXml

Serializes an IEdmModel to a CSDL XML document, the same representation the service returns from $metadata.

Syntax

Parameters

Returns

Type: string? The CSDL XML, or null when the model cannot be written (the writer reports validation errors).

Remarks

In-process hosts do not fetch $metadata over HTTP, so this is how the odata://{prefix}/$metadata MCP resource gets its text. A null result leaves that resource empty rather than failing session construction.