You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Capabilities vocabulary support(https://learn.microsoft.com/en-us/odata/webapi/capabilities-vocabulary-support) is working well for an entity until we use Key value binding
Assemblies affected
OData ModelBuilder 1.0.9
Reproduce steps
publicclassMyEntity{publicGuidId{get;set;}[Required][NotSortable][NotFilterable]publicrequiredstringSomeStringKey{get;set;}}privateIEdmModelBuildModel(){varbuilder=newODataConventionModelBuilder();varentitySetConfiguration=builder.EntitySet<MyEntity>(nameof(MyEntity));// If this line is present FilterRestrictions and SortRestrictions are removed from metadata.xmlentitySetConfiguration.EntityType.HasKey(e =>new{e.SomeStringKey,e.Id});returnbuilder.GetEdmModel();}
Expected result
Capabilities annotations should be declared whatever the entity key definition
Actual result
Capabilities annotations are ignored if the entity declare a composite
Additional detail
This may be related to #10, but I'm not sure if #10 is just obsolete or not
The text was updated successfully, but these errors were encountered:
This appears to be a feature gap. But it may be possible to achieve what you're looking for by using the capability annotations extension methods available in the library. It provides fluent APIs for configuration capability restrictions. Check the documentation here: https://learn.microsoft.com/en-us/odata/webapi/model-builder-capabilities-vocabulary
[Capabilities vocabulary support(https://learn.microsoft.com/en-us/odata/webapi/capabilities-vocabulary-support) is working well for an entity until we use Key value binding
Assemblies affected
Reproduce steps
Expected result
Capabilities annotations should be declared whatever the entity key definition
Actual result
Capabilities annotations are ignored if the entity declare a composite
Additional detail
This may be related to #10, but I'm not sure if #10 is just obsolete or not
The text was updated successfully, but these errors were encountered: