I am using ADO.Net Data Services and have a Service Operation that ends up returning the results of some linq to entities statements. As a part of those Linq statements there is a .Include("NavProp") to include a sub-object. When running this service operation it doesn't appear to return that expanded Include. Does anyone know either why that is or how to fix that? Is it possible to add a keyword in the call to the service operation to expand that sub-object? (I tried $expand=subObject but that doesn't seem to work - bad request).
I'd like to end up with either: 1.) syntax for a linq statement in a service operation that returns the .Include also (i'm pretty sure this isn't possible)
something like:
(from c in context.MyObj.Include("SubObj")
select c).ToList()
(this works inside the service operation, but doesn't provide the SubObj on the client side)
or
2.) syntax for the service operation request to expand the subObject
something like: http://localhost/MyDataService/MyDataService.svc/ServiceOp1?param1=234$expand=SubObj (note: this doesn't work)