RIA Services query: Nested "from" and include children
- by Stéphane Bebrone
Hi guys,
I have the following schema.
What I'd like to do is to retrieve all customers (and children properties) from a selected StaffAssignment by StaffId.
So I've written the following query:
from c in ObjectContext.Customers.Include("Assignments.Activities")
from a in c.Assignments
from sa in a.StaffAssignments
where sa.StaffId == staffId
select c
But children properties aren't loaded (I added the [Include] in service metadata file as well).
What did I do wrong?
Gtz,
Stéphane.