Sorting Lists
I added sorting to all list endpoints:
- It is configured using the
sort
query parameter. - It only works on properties that have the
Sortable
attribute, so that we don't leak other data or create weird SQL queries. A list of these properties per entity type is stored inSortableMetadata
. - I also added
EntityMetadataProvider
, which obtains and cachesSortableMetadata
. LocalizedString
s are sorted by theiv
culture by default. This can be changed by adding a dot and a two-letter culture code. For examplename.cs
will prefer to sort by the Czech variant of theName
property and will only useiv
as a fallback.- All endpoints sort by
name.iv
by default, exceptAccountListEndpoint
which sorts byemailAddress
.
Goodbye lists in randomized order every time we deploy the app. :D