OData / ModelBuilder

A project to generate Edm (Entity Data Model) from CLR types
19 stars 19 forks source link

Annotation TopSupported should be a Tag, not a Record #32

Closed joostverhoog closed 1 year ago

joostverhoog commented 2 years ago

TopSupportedConfiguration.ToEdmExpression creates a EdmRecordExpression, but TopSupported is a Core.Tag.

Assemblies affected

OData ModelBuilder

Reproduce steps

  1. Have a simple class Students
  2. Add an entity set for it that does not have top supported: new ODataConventionModelBuilder().EntitySet<Student>("Students").HasTopSupported().IsTopSupported(false);
  3. Inspect the resulting $metadata file

Expected result

The Students entity set has an annotation <Annotation Term="Org.OData.Capabilities.V1.TopSupported" Bool="true" />

Actual result

The Students entity set has an annotation

<Annotation Term="Org.OData.Capabilities.V1.TopSupported">
  <Record>
    <PropertyValue Property="TopSupported" Bool="false"/>
  </Record>
</Annotation>