CHAPTER 14 LINQ to SharePoint and SPMetal

In previous versions of SharePoint, you could query lists and document libraries using Collaborative Application Markup Language (CAML). As an XML dialect, CAML syntax is relatively easy to pick up—you simply need to know which elements perform which functions, and then combine them to form a query. For example, a CAML query to return all items in a list named Products, where the product name begins with the letter A, might look something like this:

<Query>   <Where>       <BeginsWith>          <FieldRef Name='Title' />          <Value Type='Text'>A</Value>       </BeginsWith>    </Where> </Query>

The CAML syntax covers a number of standard functions, including logic operations such as AND and OR as well ...

Get Microsoft SharePoint 2010 Web Applications The Complete Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.