Linq queries directly against Dynamics CRM using Silverlight!
We have been working on another version of XrmLinq which will work with silverlight. This version will allow you to write linq queries directly against crm in a silverlight project without going through a WCF service!
How does it work?
Queries are exactly the same as the standard XrmLinq library.
var results = (from a in context["account"]
where a.Attribute<int>("statecode") == 0
orderby a.Attribute<string>("name") ascending
select a).Take(5).ToList();
The connection class has been modified to remove the dependency on Microsoft.Crm.* dlls since they are not silverlight compliant. To create a connection to the crm server you will need to use the following piece of code
XrmDataContext context = new XrmDataContext(new Connection
{
CrmSdkUrl = "http://crm05.xrmlinq.local:4505/mscrmservices/2007/crmservice.asmx",
CrmOrgName = "SiverlightPrototype",
Domain = "XrmLinq",
UserName = "amattson",
Password = "password"
});
Silverlight constraints…
HttpWebRequest
The existing HttpWebRequest class in silverlight is missing a lot of functionality, specifically NTLM and Basic authentication, therefore we had to create a custom version of it using raw sockets to connect to crm.
Thanks to silverlight and it’s new security model you have to have a service running on the server serving you a policy file, to make matters worse the crm server has to be running on a specific port range hence port 4505 in the above example.
Roadmap
- Beta 1 – late October
- Strongly typed queries
- Beta 2 – late November
- Creating, updating and deleting records
- Full capability of the standard XrmLinq library
- IFD installations
- RTM – January 2010
If you would like to download and try daily builds of XrmLinq SL please email support@xrmlinq.com.





Try XrmLinq