Join Sharepoint Lists with LINQ - SharePoint 2010
On MSDN, the Join() operator mark as inefficient query and it will be possible only with LookUp fields. To avoid inefficient LINQ queries in SharePoint we can use LINQ to SharePoint provider and LINQ to Objects provider. The combination of these two providers can help us to deal with inefficient LINQ queries type. Prepare for Developing LINQ to SharePoint • SharePoint Lists - For this example I used two simple lists, joined with a regular CustomerID Text field Column. Customer List: Order List: To keep it simple, the columns in this example are all Single line of text fields • To use the LINQ to SharePoint Provider you need add this references Microsoft.SharePoint.Linq.dll and add the following using statement at the top of your class Microsoft.SharePoint.Linq using System.Linq; • To use LINQ to Objects add this reference System.Core.dll and add the following using statement at the top of your class using System.Linq; • To be able