SharePoint 2010: How to View CAML Generated by LINQ?

Another new feature of SharePoint Server 2010 is the ability to leverage LINQ Framework and LINQ Entities against SharePoint Lists by using LINQ to SharePoint. Under the covers, LINQ Framework will convert LINQ to SharePoint statements into CAML, and Execute CAML against the SharePoint object model or Web Services. In order to ensure optimization of […]

Another new feature of SharePoint Server 2010 is the ability to leverage LINQ Framework and LINQ Entities against SharePoint Lists by using LINQ to SharePoint. Under the covers, LINQ Framework will convert LINQ to SharePoint statements into CAML, and Execute CAML against the SharePoint object model or Web Services. In order to ensure optimization of CAML Queries, it's essential that you're able to inspect CAML generated by LINQ Framework.

Note: This how-to topic uses DataModels.SharePointList solution as an example of a project with generated SPLinq classes. This topic assumes that you've already generated LINQ to SharePoint DataContext and Entity classes.


View CAML Generated by LINQ to SharePoint

[Source]