This is a basic LINQ question.
In my RIA Services Application, I have a Family object with Contacts in a child list. This is a entity framework application.
I am wondering why when I select my fam the child list of Contacts are not loaded, well I know that it must because of lazy loading but how to I get my query to load the children.
var fam = from f in ContextContainer.FamilyCtx.Families
where f.familyId == fID
select f;
Best Answer
I think you should have something similar to:
ContextContainer.LoadFamilies(fam, null);
The "LoadFamilies" is autogenerated from RIA services.
there should then be an OnLoaded event when the async result has been completed.
you can then say somelistbox.ItemSource = e.LoadedEntities