UPDATE Version 4.0.12 of the Microsoft CRM SDK includes a Linq query provider for CRM. I (friism) haven't tested it, but you should probably give it a try before going with LINQtoCRM. Read the short announcement.

Introduction

The Linq to CRM project provides a custom query provider for Microsoft Dynamics CRM/xRM (mscrm).

Found a query you think should work, but LinqtoCRM breaks or returns the wrong data? Please create a work-item or send it to me at friism+linqtocrm@gmail.com.

Features

  • Where-clauses of some complexity (And/Or, greater/less-than etc.)
  • Joins through relationtionships, including many-to-many ones
  • Translation of queries to FetchXML
  • Parsing of result to anonymous types or CRM entities
  • Orderby
  • Skip/Take
  • Count
  • Contains, StartsWith, EndsWith
  • CRMMetal tool for generating many-to-many relationship classes

Ressources

Todo

  • A visual debugger/visualizer to show were you've been too ambitious with your query. Bart De Smet seems to have the right idea
  • A "pedal-to-the-metal" toggle. If the code will be running with acess to the SQL-server, the developer can specify that the query should be translated to SQL and run on the filtered views at the flick of a switch.
  • The CRM web service is tangled up in the queryprovider code. It would be desirable if it could be moved outside and accessed though an interface. The code is rather dependent on the types exposed by the web service proxy-classes and it is not clear how this dependency could be removed without implementing something along the lines of SQLMetal/SPMetal.

Credits

Last edited May 23, 2010 at 8:11 AM by friism, version 77