OData Query Option top Forces Data To Be Sorted By Primary Key

I’ve recently started using Microsoft’s WCF Data Services which supports OData Services.  What this means is that we can access resources by simply specifying a URI.  This concept greatly simplified building an ORM layer on a web site, as well as creating the linkage between the server side data and the client side application, which in my case is usually a browser. So, the issue this blog addresses is that if you form a URI with the parameter $top={anything}, your data will automatically be sorted.  The documentation for OData on top basically says that, but it could be clearer.  It says the following: “If the data service URI contains a $top query option, but does not contain a $orderby option, then the Entries in … Continue Reading


Get every new post delivered to your Inbox

Join other followers: