WCF ODATA: OrderBy on a navigation property does not work

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. DevCraft banner
  4. Óscar
    Óscar avatar
    1 posts
    Member since:
    Apr 2016

    Posted 21 Apr 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