WCF Data Services Protocol Implementation Details
The Open Data Protocol (OData) requires that a data service that implements the protocol provide a certain minimum set of functionalities. These functionalities are described in the protocol documents in terms of “should” and “must.” Other optional functionality is described in terms of “may.” This topic describes these optional functionalities that are not currently implemented by WCF Data Services. For more information, see OData Protocol Documentation.
Support for the $format Query Option
The following WCF Data Services behaviors are not explicitly defined by the OData protocol:
Default Sorting Behavior
When a query request that is sent to the data service includes a $top or $skip system query option and does not include the $orderby system query option, the returned feed is sorted by the key properties, in ascending order. This is because ordering is required to ensure the correct paging of results. To do this, the data service adds an ordering expression to the query. This behavior also occurs when server-driven paging is enabled in the data service. For more information, see Configuring the Data Service (WCF Data Services).To control the ordering of the returned feed, you should include $orderby in the query URI.