Chapter 32. Data Services
WHAT'S IN THIS CHAPTER?
Overview of WCF Data Services
WCF Data Services hosting with CLR objects
HTTP client access to WCF Data Services
URL queries to WCF Data Services
WCF Data Services with the ADO.NET Entity Framework
Using the WCF Data Services .NET Client Provider
Tracking, Updates, and Batching
In the previous chapter you saw the ADO.NET Entity Framework used to easily create an object model to map to the database structures. The Entity Framework does not provide a way to get the objects across different tiers. This is where WCF Data Services come into play. WCF Data Services offers a WCF service to easily access data provided by an Entity Data Model or by simple CLR objects implementing the IQueryable<T>
interface.
OVERVIEW
The ADO.NET Entity Framework offers mapping and creates entity classes representing databases. With the data context from the Entity Framework, the data context stays informed about changes to data so that it knows what should be updated. The Entity Framework does not help when creating solutions over multiple tiers.
Using WCF Data Services, you can use the Entity Framework (or a simple CLR object model) on the server side and send HTTP queries from the client to the service to retrieve and to update data. Figure 32-1 shows a typical scenario with a Windows client or a Web page using HTML and JavaScript to send an HTTP request to the server.
Figure 32.1. FIGURE 32-1
The returned information can be in AtomPub or JSON format. AtomPub is the ...
Get Professional C# 4 and .NET 4 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.