Filter not working in ADO.NET Data Services?


I know this probably sounds kind of silly for a blog post, but:


9 times out of 10, if your ADO.NET filter isn’t changing the results you get back, make sure you are using “path?$filter=f” rather than “path?filter=f”.


Turns out that without the ‘$’ prefix, ADO.NET Data Services won’t recognize the filter command. I’m sure I’ve discussed this in the past, but I can’t find the reference, so let me replay it here.


Query parameters prefixed with ‘$’ are reserved for system use (try it!). Everything else is for the service author to that whatever is desired.


Typically we’ll map these “bare” parameters to service operation parameters, but if they don’t map to anything, we’ll just let them be.This allows you (or some other plug-in in your web server) to pass a session ID or any other desired information in the query portion of the URL.

Skip to main content