Monday, December 7, 2009

Tool to enhance Developer Productivity - XRMLinq

It is designed to increase Developer productivity by reducing the amount of time and effort needed to effectively use Dynamics CRM. Instead of learning the ins and outs of the complex Software Development Kit (SDK) and the complexities of CRM you can use this library, putting CRM into a context that you are already familiar with.

Example:
CRM SDK
QueryExpression q = new QueryExpression();
q.EntityName = "account";
q.ColumnSet = new AllColumns();

q.Criteria = new FilterExpression();
q.Criteria.FilterOperator = LogicalOperator.And;
q.Criteria.AddCondition("name", ConditionOperator.Like, "A%");

q.AddOrder("name", OrderType.Ascending);

BusinessEntityCollection r = sdk.RetrieveMultiple(q);
foreach (account account in r.BusinessEntities)
{
Console.WriteLine(account.name);
}

XrmLinq
CrmDataContext context = new CrmDataContext(sdk);

var accounts = (from a in context.Accounts
where a.Name.StartsWith("A")
orderby a.Name
select a).ToList();

foreach (var account in accounts)
{
Console.WriteLine(account.Name);
}

The tool requires developer license to work. Read about it at:

http://www.xrmlinq.com/

1 comment:

  1. Good news - the CRM SDK 4.0.0012 now has a LINQ-to-CRM query provider.

    ReplyDelete