Expand does not work for deep includes
I have an OData query like this:
http://localhost:41084/odata/Appointments?$expand=Person,Person/Address
This will give the following exception:
A specified Include path is not valid. The EntityType 'Site.Data.Appointment' does not declare a navigation property with the name 'Address'.
Which is correct because Appointment does not have a property Address, Person does, so it doesn't work very well with the deep includes.
Hi @rogier21, expand in Linq to Querystring does not work in exactly the same way as described in the OData specification. Behind the scenes expand is mapped directly to the Include method and currently we don't support nested properties here.
That said, I will try to take a look when I have some time over the next few weeks to see if it is possible to extend this for you.
Thanks! I think deep includes would be a nice to have anyway, even if it's not for the OData spec.