O'Reilly logo

Microsoft SharePoint 2010 Web Applications The Complete Reference by Charlie Holland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required