Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Unassigned: $orderby fails on complex collections [1281]

$
0
0
URL [http://localhost/Customers(42)/Addresses?$orderby=City](http://localhost/Customers(42)/Addresses?$orderby=City)

fails with exception,

```
"message":"Only ordering by properties at the root level is supported for
non-primitive collections. Nested properties and expressions are not supported."
```

```
public class CustomersController : ODataController
{
[Queryable]
public IQueryable<Address> GetAddresses()
{
return new Address[] { }.AsQueryable();
}
}

public class Customer
{
public string IDD { get; set; }

public Address[] Addresses { get; set; }
}

public class Address
{
public int City { get; set; }
}
```

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>