Saturday, June 12, 2010

CRM 4.0 QUERY T4 Template

Hi Everyone,

I've finally got around to publishing some work I've done recently which leverages LINQ to SQL, T4 Templates and the CRM 4.0 API to create a data access layer to CRM.

Originally I started write a Query provider for LINQ, but found it to be an extreme amount of work - and decided instead to return to old faithful - LINQ to SQL - which I have a good grounding in.

Recently, Microsoft have added a LINQ to CRM query provider to the SDK (Version 4.0.12) so you should check that out. If it doesn't suit you, here's an alternative.

  • Uses LINQ to SQL for Querying, meaning that you have the complete power of LINQ to SQL at your disposal
  • Database Queries do not go through CRM API, so they are potentially faster
  • Uses the CRM 4.0 API for CUD (Create, Update, Delete) operations - so data integrity is maintained.
  • Can generate only selected entities, rather than the entire CRM Entity list.
  • Works with WCF RIA services and any other technology that takes advantage of LINQ to SQL
  • You don't need to Leave the Visual Studio Environment, T4 generation is done within Visual Studio.

Anyway, if you have the time or the need, check it out here.



No comments: