Thanks Silvio, if I read the manual I would of come across this sooner.
http://drc.ideablade.com/xwiki/bin/view/Documentation/query-include-predicate
My next question is I am following the practices of Cocktail's repository pattern. How best can I return an IEntityQuery type? I need to access my model's Person, Address and my RegionLocalized.FullDescription property in my View. My entity model associations look like this:
Employee --> Person --> Address --> Region --> RegionLocalizeds
Technically I could bypass the Region entity since my Address entity has a RegionId property that could join to my RegionLocalized entity that has the FullDescription property I need to pull back for the address state name.
I tried this earlier once I read the documentation but I need to return some kind of IEntityQuery.
IEntityQuery<?????> query = Manager
.Employees
.Where(e => e.EmployeeId == Guid.Parse("2661C686-66CD-4E7A-8E5C-1C0EA43F1D6B"))
.Select(e => new
{
Person = e.Person,
Address = e.Person.Address,
RegionLocalized = e.Person.Address.Region.RegionLocalizeds.Where(rl => rl.RegionId == e.Person.Address.RegionId)
});
EntityQueryOperation<Model.Employee> queryOperation;
yield return queryOperation = query.ExecuteAsync();
yield return Coroutine.Return(queryOperation.Results.First());
Thanks...