WCF Data Services 5.0 RTM Release

I’m very pleased to announce the WCF Data Services 5.0 RTM release. You can download WCF Data Services 5.0 from here. This release includes several client and server features and libraries for .NET 4 and Silverlight 4.

Below is a brief breakdown of the features that are available in this release. Upcoming blog posts will dive into

Vocabularies

By providing the ability to annotate metadata and instance data, vocabularies define a powerful extensibility point for OData. They convey meaning and extra information to enable richer client experiences. Simple vocabulary terms can do things like indicate a property’s acceptable value range. A more complex vocabulary terms could define a mapping between a particular service’s person entity and a vCard schema.

WCF Data Services 5.0 allows data service authors to use vocabularies in $metadata.

Actions Actions in OData extend the set of operations that can be performed on or with a service or resource. Actions provide a way to inject behaviors into an otherwise data centric model without confusing the data aspects of the model. They stay true to the resource oriented underpinnings of OData. Actions may be used to extend CUD operations, invoke custom operations, etc.

WCF Data Services 5.0 allows setting up a service with Actions as well as invoking actions and service operations with full support for parameters. However, to expose Actions you need to provide or source an implementation of IDataServiceActionProvider that works with the rest of the service. Subsequent blog posts on Actions will dig deeper on this feature. Read more about our actions support here.

Spatial

There has been an explosion of location-aware devices and more demand for location-aware applications. OData supports geospatial data and WCF Data Services 5.0 comes with 16 new spatial primitives and some corresponding operations. This enables data consumers to perform operations on spatial values in filter, select and orderby clauses.

Spatial primitives enable service authors to indicate, for example, that a property is a point, a line, or a polygon. These spatial primitives follow the OGC’s Simple Features standard.

Actions and Functions can be used to extend the operations associated with these primitives. This allows some servers to expose deep algorithms for powerful functionality while other services expose only basic operations. The community can develop vocabularies to describe common categories of advanced operations and indicate which ones a given service supports.

WCF Data Services 5.0 allows addition of spatial type properties to models via Reflection and Custom Service Providers. This enables read/write support in ATOM or JSON formats for all spatial types supported by SQL Server 2008 R2. Moreover, this release supports querying for all entities ordered/filtered by distance to a location (i.e. find all coffee shops near me).

ODataLib:

The ODataLib .NET client and server libraries allow flexible low-level serialization/deserialization according to the OData Protocol Specifications. ODataLib now supports serialization and deserialization of all OData payloads.

EdmLib

ODataLib now ships with EdmLib, a new in-memory metadata system that makes it easy to build an Entity Data Model (EDM) of a service for OData serialization/deserialization. Moreover, EdmLib enables creation and consumption of annotations on any EDM model.

Any/All

WCF Data Services 5.0 increases the expressiveness of WCF Data Services queries to be able to express queries like ‘are there any customers which have no orders’ or ‘are there any customers who only spend more than $100 at our shop’. We support the ‘any’ and ‘all’ canonical functions via the WCF Data Services client LINQ support.

Better Support for Inheritance

WCF Data Services 5.0 supports both exposing and consuming models which have properties (primitive, complex and navigation) defined on subtypes of the base type associated with the set.

Collections

WCF Data Services 5.0 adds support for properties as collections of primitive or complex types. This enables easier modeling of things like lists of alternate email addresses for a Customer.

Named Streams

WCF Data Services 5.0 release allows an entry to have multiple streams associated with it such that you can now create services that do things such as expose a Photo entry with links to its print, web, and thumbnail versions.

Patch Method Support PATCH is now a standard and is semantically equivalent to the MERGE method. WCF Data Services 5.0 release supports the PATCH method as a synonym to MERGE.

Prefer Header Support

Following the semantics of the Prefer header, WCF Data Services now support returning responses to Insert and Update requests.

 

We look forward to hearing your thoughts on the release.

 

Turker Keskinpala

Program Manager

WCF Data Services/OData Team