While creating Silverlight plugins for CRM 2011 we are in need of retrieving related entities for a particular entity. By far there is no way of retrieving this data using some kind of query expression or even lambda expression for that matter. After a lot of thought I have found the way out to do this. I had searched the entire web and not a single reference to do this kind of retrieval was found. I hope the following code helps you.
var query = _context.AccountSet.AddQueryOption("$expand", "new_account_address").Where(a => a.ActivationStatus.Equals("A")) as DataServiceQuery;
In the above code “$expand” is the OData operator for retrieving related entities and the parameter passed to the function i.e. “cnc_account_address” is the relationship name between account entity and address entity.
After you execute the query you can find the related address data in their respect account record.
Please post back in case of queries.