0
votes

I looking for a way to query the CRM 2011 database with from a Silverlight client. Something like LINQ-to-CRM but for 2011 and Silverlight. I googled a lot but to no avail. I know it is possible with the "normal" SDK, but with Silverlight? Is there a way to do this?

Best, Rocko

2
Direct queries of the DB? Not via the built-in web services? Could you clarify, please? The reason I ask is that the latest MSDN mag has an article on accessing CRM 4 through silverlight. While it's 4-focused, it should be applicable to 2011, too. msdn.microsoft.com/en-us/magazine/…vinny

2 Answers

3
votes

CRM 2011 exposes its own WCF data service which it calls the ODATA service. You can query this from client code (e.g. Javascript or SilverLight), and there should be examples of this in the SDK.

Download the SDK from here, and look in this folder: sdk\samplecode\cs\silverlight\crmodatasilverlight

I know this isn't 'LINQ to CRM' as such but it's perfectly adequate. Otherwise, you could look into Dynamic Entities as a method of returning data, as this would let you send LINQ queries; see here.

0
votes

Your best bet would be to create a WCF service that serves up the data (could even be an ado.net service) and then make a reference to the WCF service from your Silverlight application.