ADO.NET Data Services
   HOME

TheInfoList



OR:

WCF Data Services (formerly ADO.NET Data Services, codename "Astoria") is a platform for what Microsoft calls ''Data Services''. It is actually a combination of the runtime and a web service through which the services are exposed. It also includes the Data Services Toolkit which lets Astoria Data Services be created from within
ASP.NET ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stan ...
itself. The Astoria project was announced at
MIX Mix, mixes or mixing may refer to: Persons & places * Mix (surname) ** Tom Mix (1880-1940), American film star * nickname of Mix Diskerud (born Mikkel, 1990), Norwegian-American soccer player * Mix camp, an informal settlement in Namibia * Mix ...
2007, and the first developer preview was made available on April 30, 2007. The first CTP was made available as a part of the
ASP.NET ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stan ...
3.5 Extensions Preview. The final version was released as part of
Service Pack In computing, a service pack comprises a collection of updates, fixes, or enhancements to a software program delivered in the form of a single installable package. Companies often release a service pack when the number of individual patches to a ...
1 of the
.NET Framework 3.5 Microsoft started development on the .NET Framework in the late 1990s originally under the name of Next Generation Windows Services (NGWS). By late 2001 the first beta versions of .NET 1.0 were released. The first version of .NET Framework was r ...
on August 11, 2008. The name change from ADO.NET Data Services to WCF data Services was announced at the 2009
PDC PDC may refer to: In science and technology Chemistry, biology and medicine * Phosducin, a human protein and gene in the retina * Pyridinium dichromate (Cornforth reagent), a chromium-based oxidant * Pyruvate dehydrogenase complex, an enzyme ...
.


Overview

WCF Data Services exposes data, represented as Entity Data Model (EDM) objects, via web services accessed over HTTP. The data can be addressed using a REST-like
URI Uri may refer to: Places * Canton of Uri, a canton in Switzerland * Úri, a village and commune in Hungary * Uri, Iran, a village in East Azerbaijan Province * Uri, Jammu and Kashmir, a town in India * Uri (island), an island off Malakula Islan ...
. The data service, when accessed via the HTTP GET method with such a URI, will return the data. The web service can be configured to return the data in either plain XML,
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other ser ...
or RDF+XML. In the initial release, formats like
RSS RSS ( RDF Site Summary or Really Simple Syndication) is a web feed that allows users and applications to access updates to websites in a standardized, computer-readable format. Subscribing to RSS feeds can allow a user to keep track of many di ...
and ATOM are not supported, though they may be in the future. In addition, using other HTTP methods like PUT, POST or DELETE, the data can be updated as well. POST can be used to create new entities, PUT for updating an entity, and DELETE for deleting an entity.


Description

Windows Communication Foundation (WCF) comes to the rescue when we find ourselves not able to achieve what we want to achieve using web services, i.e., other protocols support and even duplex communication. With WCF, we can define our service once and then configure it in such a way that it can be used via HTTP, TCP, IPC, and even Message Queues. We can consume Web Services using server side scripts (ASP.NET), JavaScript Object Notations (JSON), and even REST (Representational State Transfer). Understanding the basics When we say that a WCF service can be used to communicate using different protocols and from different kinds of applications, we will need to understand how we can achieve this. If we want to use a WCF service from an application, then we have three major questions: 1.Where is the WCF service located from a client's perspective? 2.How can a client access the service, i.e., protocols and message formats? 3.What is the functionality that a service is providing to the clients? Once we have the answer to these three questions, then creating and consuming the WCF service will be a lot easier for us. The WCF service has the concept of endpoints. A WCF service provides endpoints which client applications can use to communicate with the WCF service. The answer to these above questions is what is known as the ABC of WCF services and in fact are the main components of a WCF service. So let's tackle each question one by one. Address: Like a webservice, a WCF service also provides a URI which can be used by clients to get to the WCF service. This URI is called as the Address of the WCF service. This will solve the first problem of "where to locate the WCF service?" for us. Binding: Once we are able to locate the WCF service, one should think about how to communicate with the service (protocol wise). The binding is what defines how the WCF service handles the communication. It could also define other communication parameters like message encoding, etc. This will solve the second problem of "how to communicate with the WCF service?" for us. Contract: Now the only question one is left with is about the functionalities that a WCF service provides. The contract is what defines the public data and interfaces that WCF service provides to the clients. The URIs representing the data will contain the physical location of the service, as well as the service name. It will also need to specify an EDM Entity-Set or a specific entity instance, as in respectively http://dataserver/service.svc/MusicCollection or http://dataserver/service.svc/MusicCollection omeArtist/nowiki> The former will list all entities in the ''Collection'' set whereas the latter will list only for the entity which is indexed by ''SomeArtist''. The URIs can also specify a traversal of a relationship in the Entity Data Model. For example, http://dataserver/service.svc/MusicCollection omeSongGenre traverses the relationship ''Genre'' (in SQL parlance, joins with the ''Genre'' table) and retrieves all instances of ''Genre'' that are associated with the entity ''SomeSong''. Simple predicates can also be specified in the URI, like http://dataserver/service.svc/MusicCollection omeArtistReleaseDate ear eq 2006/nowiki> will fetch the items that are indexed by ''SomeArtist'' and had their ''release'' in ''2006''. Filtering and partition information can also be encoded in the URL as http://dataserver/service.svc/MusicCollection?$orderby=ReleaseDate&$skip=100&$top=50 Although the presence of ''skip'' and ''top'' keywords indicates paging support, in Data Services version 1 there is no method of determining the number of records available and thus impossible to determine how many pages there may be. The
OData In computing, Open Data Protocol (OData) is an open protocol that allows the creation and consumption of queryable and interoperable REST APIs in a simple and standard way. Microsoft initiated OData in 2007. Versions 1.0, 2.0, and 3.0 are relea ...
2.0 spec adds support for the $count path segment (to return just a count of entities) and $inlineCount (to retrieve a page worth of entities and a total count without a separate round-trip....).


References

*


External links


ADO.NET Data Services Framework (formerly "Project Astoria")

Using Microsoft ADO.NET Data Services

ASP.NET 3.5 Extensions Preview

ADO.NET Data Services (Project Astoria) Team Blog

Access Cloud Data with Astoria: ENT News Online
{{.NET Framework Data management Web services ADO.NET Data Access technologies .NET