BT

Your opinion matters! Please fill in the InfoQ Survey!

Named Resource Streams for WCF Data Services

| by Jonathan Allen Follow 250 Followers on Nov 25, 2010. Estimated reading time: 1 minute |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

Originally known as Astoria and released under the name ADO.NET Data Services, WCF Data Services is a REST-style framework for exposing and querying structured data. The results can be returned as plain XML, JSON or RDF+XML. The overall protocol is known as OData and has been released under Microsoft’s Open Specification Promise.

Under the current version of WCF Data Services, developers can associate only one streaming resource with a given entity. A typical use for this would be an entity describing an image or video and the image/video file itself. Obviously this has some limitations when one want to expose multiple versions of the same resource without duplicating the entity data.

With the October 2010 CTP, developers can now add additional named streams to an entity. For example, for images you may have streams named “Thumbnail”, “Small”, and “Full”. The list of named streams is defined at the meta-data level, which means each instance of entity has the same named list.

In addition to specifying the list of named streams, the method of which depends on how the entities are defined, once must also implement the IDataServiceStreamProvider2 interface. The process for implementing this interface is essentially the same as the original version. For more information see the WCF Data Services blog.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT