FetchXML vs RetrieveMultiple

Nov 20, 2008 at 10:17 PM
I'm fairly new to MSCRM and love the idea of using Linq to query business entities!
The Linq queries I've written so far require about 50% less code than when I was using QueryExpression, which is great for readability/maintainability.

I was just curious, why has Fetch been used instead of RetrieveMultiple?
Are there things that can be done in FetchXML (via Stunnware's Fetch library) that can't be done using a regular CRM QueryExpression?
Is there any significant difference in performance between the two?

Dec 22, 2008 at 4:40 PM
Hi Nathan

FetchXML was chosen because mapping LINQ queries to XML was much easier than creating QueryExpression queries on the fly. The existence of the FetchXML lib was also a factor.

I haven't compared FetchXML and QueryExpression performance directly. FetchXML is a lower level API and performance should be at least on par with QueryExpression which probably has to do all sorts of soap acrobatics.

LinqtoCRM incurs an overhead because it has to examine the expression trees from the LINQ queries.