Home > Development > Microsoft CRM LINQ

Microsoft CRM LINQ

September 17, 2010 Leave a comment Go to comments

If you have been under a rock the latest version of MS CRM SDK contains new bits that allow you to use LINQ plus other goodness over MS CRM.

So how do we set all this Up?

Setup Steps:

  1. Download the latest SDK from MS
  2. Reference the following Assemblies: microsoft.xrm.client.dll, microsoft.xrm.portal.dll, antixsslibrary.dll, microsoft.crm.sdk.dll,microsoft.crm.sdktypeproxy.dll,microsoft.crm.sdktypeproxy.xmlserializers.dll
  3. Create an entry in you web.config / app.config file pointing to your CRM server
  4. <connectionStrings>
          <add name="Crm" connectionString="Authentication Type=AD; Server=http://localhost:5555/Test; User ID=Test\blair; Password=somepassword;"/>

Lets create a query and look at a dynamic version of contacts now 🙂

            var context = new CrmDataContext("Crm");
            var results = from contact in context.GetEntities("contact") select contact;
            return results.ToList().Select(x => x.ToDynamicEntity()).ToList();

So there you go. Review MS Documentation. But I hope this helps you get started.

MS Documentation is here.


  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: