9.4. WDS Proxy Classes

Although in many cases you will want to work with the raw XML or JSON returned from a WDS service, it is easier to work with generated proxy classes. The generated proxy classes make it very easy to perform simple CRUD and query operations. Of course, behind the scenes they use HTTP.

9.4.1. Retrieving Items with Proxy Classes

Follow these steps to create an application to iterate through the Order objects using LINQ and the DataServiceContext class:

  1. Add a new console application to the solution called Chapter9.ADOProxy.

  2. Right-click the References folder.

  3. Select Add Service Reference to add the URL your WDS is set up at (for example, http://localhost/Chapter9/MovieService.svc).

  4. Select the BookEntities node in the Services ...

Get Introducing .NET 4.0: with Visual Studio 2010 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.