Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8565539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:26:55+00:00 2026-06-11T17:26:55+00:00

I could not find mention in the OData protocol documentation if a $filter operation

  • 0

I could not find mention in the OData protocol documentation if a $filter operation is always applied before a $skip operation. Clearly, it makes sense to do so when implementing a consistent page retrieval algorithm.

My concern is that an expression tree doesn’t impose such a constraint. For instance, the following two queries will generally produce different results.

IQueryable<string> query = (new[] { "aaa", "eee", "bbbb", "cccc", "dddd" }).AsQueryable();

query.Where(arg => arg.Length > 3).Skip(1);
query.Skip(1).Where(arg => arg.Length > 3);

I’ve done some simple testing with the ASP.NET Web API RC implementation for OData, and it does apply $filter before $skip, regardless of where the operators appear in the query string. Is this true in general though?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:26:56+00:00Added an answer on June 11, 2026 at 5:26 pm

    MS-ODATA (the OSP spec for OData) states: A data service URI with more than one query option present MUST be evaluated as if the query options were applied to the resource(s) identified by the resource path section of the URI, in the following order: $format, $inlinecount, $filter, $orderby, $skiptoken, $skip, $top, $expand.

    I think there’s actually a bug or two in the spec (which should be addressed in the next spec update) – I added this comment: How can $inlinecount be effective before $filter, and how can $filter/$orderby be effective before $expand?

    At any rate, you can assume that the spec does order the system query options, and it’s currently a MUST in the spec, so any server that claims to support OData should consistently evaluate $filter before $skip or $top.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've checked a satisfying explanation but could not find. Usually docs mention that in
I could not find a way to make a RTL paragraph in Docx using
I could not find the function that returns the name of the cell referenced.
I could not find a clear answer to this question elsewhere, so I'll try
I could not find a post to do it automatically as I don't want
I'm getting InvalidObjectException: Could not find a SessionFactory named: null after restart of tomcat
I have searched but could not find the reason for this behavior. I have
I've been searching around but could not find any answers to this. What I'm
I have an issue which I could not find answer for across the web.
I have been looking everywhere but could not find a tutorial for this. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.