AspNetCoreOData
AspNetCoreOData copied to clipboard
Not possible to set sortability/filterable on navigationproperties properties
-
AddSortRestrictionsAnnotation
only looks forentityTypeConfig.Properties.Where(property => property.Unsortable)
, it does not see if a property is navigatable and check properties for there and build a proper path. -
SetSortRestrictionsAnnotation
is internal, therefore it is impossible to easily use it Similar with filterable
@davhdavh Could you please clarify this statement "it does not see if a property is navigatable and check properties for there and build a proper path"?
We are talking about Microsoft.OData.ModelBuilder.Helpers.EdmModelHelperMethods.AddSortRestrictionsAnnotation
and AddFilterRestrictionsAnnotation
, which should recursively visit all entity types to find their nonsort (and nonfilterable) properties to some configurable depth.