Share via


Accessing SharePoint List Data Using WCF Data Services

Version: 1.0.0

Description

Silverlight applications can access SharePoint 2010 list data using ListData.svc. ListData.svc is a Rest implementation. Developers may use Visual Studio 2010 to create a proxy classes to simplify list access. This lab will demonstrate using Silverlight to access SharePoint 2010 list data using the rest interfaces.

Overview

Silverlight applications can access SharePoint 2010 list data using ListData.svc. ListData.svc is a Rest implementation. Developers may use Visual Studio 2010 to create a proxy classes to simplify list access. This lab will demonstrate using Silverlight to access SharePoint 2010 list data using the rest interfaces.

Objectives

  • Use Visual Studio to create a DataServiceContext to connect to list data.
  • Use Silverlight and the Rest API to retrieve and display list data.
  • Use Silverlight and the Rest API to update list data.

System Requirements

You must have the following items to complete this lab:

  • 2010 Information Worker Demonstration and Evaluation Virtual Machine
  • Microsoft Visual Studio 2010
  • Visual Studio 2010 SharePoint Power Tools
  • Silverlight 4 Toolkit
  • Silverlight WebPart

Setup

You must perform the following steps to prepare your computer for this lab...

  1. Download the 2010 Information Worker Demonstration and Evaluation Virtual Machine from https://tinyurl.com/2avoc4b and create the Hyper-V image.
  2. Install the Visual Studio 2010 Silverlight Web Part. The Silverlight Web Part is an add-on to Visual Studio 2010 and can be downloaded from https://code.msdn.microsoft.com/vsixforsp
  3. Install the Silverlight 4 Toolkit located at https://silverlight.codeplex.com
  4. Install the Visual Studio 2010 SharePoint Power Tools located at https://visualstudiogallery.msdn.microsoft.com/en-us/8e602a8c-6714-4549-9e95-f3700344b0d9

Exercises

This Hands-On Lab comprises the following exercises:

  1. Create a Contoso Contact List to Query
  2. Create a Query Using ListData.svc
  3. Display the Query Results in the Silverlight User Interface
  4. Add Update Functionality to the Silverlight Application

Estimated time to complete this lab: 40 minutes.

Starting Materials

This Hands-On Lab includes the following starting materials.

  • Visual Studio solutions. The lab provides the following Visual Studio solutions that you can use as starting point for the exercises.
    • <Install location>\SLSP4\Lab3\Source\Begin\SilverlightListDataService.sln: This soution is a a Silverlight Web Part with the starter code commented out.
    Note:
    Inside each exercise folder, you will find an end folder containing a solution with the completed lab exercise.