I’ve used LINQ on the fetched entities from CRM Dynamics but despite the original source of the data, it was still only operating via LINQ to data structure. Now, I’ve got a hint that there exists possibility to use LINQ to query the DB in Dynamics directly, which was surprising but (under assumption that it works out) fantastic.
So, I’ve checked the SDK and samples and as far I’ve could see, there is some kind of LINQ to CRM thing going on there. Since I have hard time believing that Microsoft has spent so much development hours on such a specialized product, I’m suspecting that it’s in fact LINQ to SQL/Entity run under the CRM (Dynamics is powered by MS SQL Server, isn’t it?) and I’d like someone to either deny or confirm it.
For instance I’ve seen those two articles: document #1 and document #2.
EDIT:
My question is, hence, if there is a true LINQ-to-CRM or if we’re dealing with LINQ-to-SQL (or something similar) run under the real of CRM Dynamics.
The examples you cited appear to be using LINQ-to-Objects.
From this MSDN page, it seems Microsoft has created a specialized API for CRM, in the form of
OrganizationServiceContext.This class is for accessing a SOAP endpoint, so it’s not leveraging L2S or LINQ-to-EF.
Whether or not the CRM web-service uses LINQ-to-SQL or LINQ-to-EF against SQL Server is a different question.