Tutorial :Silverlight 3 - RIA Services and LINQ


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;  


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

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »