Subscribe:      
 

Learn to Query the SharePoint List Data Service with LinqPad

Written By: Chris Beckett -- 9/2/2011 -- join -- contribute -- (1) comments -- printer friendly version

Rating: Rate --

Categories: Integration with other products , Programming and Customizations, SharePoint 2010, SharePoint Foundation 2010

< Prev - 1 | 2 | - Next > | Become a paid author

Problem

As the amount of business data stored in SharePoint lists and libraries increases, it is becoming a necessity to be able to access and integrate with that data across many devices and platforms using a variety of tools and technologies. How can we access SharePoint data from an iPhone? How can we access SharePoint data from a PHP-based web site?

Solution

The Open Data Protocol (ODATA) is a platform and language agnostic protocol proposed by Microsoft as a standard for reading and writing data with RESTful web services over HTTP. Although an ODATA-compliant web service can be written or consumed across just about any HTTP-enabled language or device, Microsoft introduced ADO.NET Data Services in .NET 3.51 (later renamed to WCF Data Services in .NET4) to make it easy to develop services that meet the ODATA standard.

The List Data service was introduced in SharePoint 2010, and provides an ODATA-compliant web service based on ADO.NET Data Services that provides query/insert/update/delete capabilities against SharePoint list data. This tip will demonstrate how to use LinqPad to query the List Data service using Linq to SQL syntax, and examine how Linq queries are translated to the ODATA protocol, can be used with the List Data service.

Introducing LinqPad

LinqPad is a free development tool for learning and testing Language Integrated Query (LINQ) against SQL, ODATA, or an Entity Framework solution. One of the advantages of the LinqPad utility is that it will translate LINQ syntax into ODATA compliant HTTP requests, and show the results in a data grid, as well as the generated ODATA URL syntax. It is a great learning tool for exploring both LINQ and ODATA.

< Prev - 1 | 2 | - Next >



Learn more about SharePoint



Sponsor Information




Copyright (c) 2010-2017 Edgewood Solutions, LLC All rights reserved
privacy | disclaimer | copyright | advertise | contribute | feedback | about
Some names and products listed are the registered trademarks of their respective owners.


MSSharePointTips.com | MSSQLTips.com