You can write a book on LINQ. Many books, in fact, have been written on LINQ. I suggest you seek out 101 LINQ Samples on MSDN to get a feel for the vaguely SQL-like syntax for querying data. You can use LINQ to query just about anything, as Microsoft has "providers" for SQL data, XML, objects, and now…. SharePoint! The role of the provider is to translate the LINQ query into the "native" query format – in the case of SharePoint that is actually CAML (Collaborative Application Markup Language).
But to use LINQ against SharePoint, you need a "data context" – physically a C# class that is generated from the data source – meaning in our case the SharePoint lists in your site. There is a command-line utility called SPMetal.exe
, whose purpose in life – besides having the coolest name Microsoft has come up with – is to generate said C# file when pointed at a SharePoint site.
It is a bit of a bother to run that utility, so the recently available Visual Studio...