More Complex Operations in ADO.NET Data Services
page 1 of 5
Published: 30 Nov 2009
Abstract
In this article, Sergey describes how to define custom user operations in ADO.NET Data Services or Astoria. These operations can return plain content or a collection of objects. The article examines this aspect with the help of relevant code snippets. Sergey provides a brief overview of the data model instance control and delves deep into Service operations. Towards the end of the article, Sergey points out the various data representation formats, which Astoria returns when a web service is executed.
by Sergey Zwezdin
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 32439/ 58

Introduction

ADO.NET Data Services platform is a powerful tool to build services based on REST approach. Such services allow to work with data via HTTP conveniently. In platform ADO.NET Data Services there is a lot of implemented functional capabilities that could be used in service-oriented applications. For example, access to separate entities and fields is available out of a box. Also it is possible to perform filtration, sorting and splitting into pages operations on a server side.

All these opportunities are included in structure of ADO.NET Data Services by default and don't demand additional setting. However, in some situations there is a need to realize more flexible settings of a service work and change its behavior a little. Besides there are some situations when usual accesses to collections isn't enough and it is necessary to implement more complex logic. In this article you can read about the way to implement non-standard operations in web services, information about fine-tune of web services based on ADO.NET Data Services platform.


View Entire Article

User Comments

Title: fasdfa   
Name: asdfasdf
Date: 2012-08-25 7:46:11 AM
Comment:
asdfsdf
Title: developer   
Name: developer
Date: 2011-07-31 1:24:23 PM
Comment:
When I try this in new version of WCF Data Services,
public System.IO.Stream GetCustomerPhoto(string customerId)
generates an exception and says that Stream cannot be serialized and returned.
Do you know why?
Title: System.IO.Stream GetCustomerPhoto?   
Name: Dana
Date: 2010-03-11 2:46:40 PM
Comment:
You can return an image from a service operation? I couldn't figure this out. Can you elaborate on that stub? When I tried to create the service operation and then "update service reference" from my client app, I got an error to the effect that the meta data couldn't be created.
Great article and any further info is appreciated. Thanks,
Dana
Title: moreclick   
Name: moreclick
Date: 2009-12-07 2:17:58 AM
Comment:
Thanks for sharing, I love reading you should post more often...

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2017 ASPAlliance.com  |  Page Processed at 2017-02-23 1:30:58 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search