WCF ODATA: OrderBy on a navigation property does not work

Thread is closed for posting
3 posts, 0 answers
  1. Samuel
    Samuel avatar
    13 posts
    Member since:
    Aug 2013

    Posted 26 Sep 2013 Link to this post

    Consider the following pseudo-model:

    Document { 
     Id : int
     Filename : String
     Client :  Client

    Client {
     Id: int
     Name: String
     City: String

    The following ODATA query fails:


    The error is: 

    • "The child type 'Client.City' in a cast was not an entity type. Casts can only be performed on entity types."

    I've tried with various types of entities and sorting works fine on simple properties but as soon as I sort by navigation properties, it fails.

    Could that be a bug in the Queryable implementation ? Or am I missing something ? 

  2. Samuel
    Samuel avatar
    13 posts
    Member since:
    Aug 2013
  3. inane.ensemble
    inane.ensemble avatar
    1 posts
    Member since:
    Apr 2016

    Posted 21 Apr 2016 in reply to Samuel Link to this post

    Hello Samuel,


    Could you please tell me odata version are you using??


    Thank you.

Back to Top