Hooked on LINQ

Hooked on LINQ - Developers' Wiki
for .NET Language Integrated Query

Quick Search

Advanced Search »

ADO.Net Data Services

Modified: 2008/06/17 18:13 by t_magennis - Categorized as: ADO.Net Data Services
Edit

Introduction

Originally codenamed Project Astoria, ADO.Net Data Services provides a REST style interface to any data-source that implements the IQuerable interface (and IUpdatable for writeable data-sources).

REST style interfaces use the basic HTTP protocol components to communicate between client and server sides of interfaces. Whereas SOAP style web-service interfaces require the client to understand the SOAP specific format, REST style clients just need to know how to form a URL and how to GET and POST data just like a form on any web-page does when you click the Submit button. This sounds like a simplification, and for the client side it is - but the feature set of what the URL can ask for is anything but simplistic as you will see. ADO.NET Data Services provides a very web friendly interface for performing CRUD operations over the Internet or between layers in any application.

Edit

Basic Examples

TODO: Show some basic URL's and responses to get people interested

Edit

Supported Datasources

The ADO.Net Data Services builds upon some basic interfaces. Due to the way LINQ is designed at its core, ADO.Net Data Services works effectively with any existing IQueryable property implementation with a few small requirements.

1. EDM - ADO.NET Entity Framework
2. LINQ to SQL
3. Any IQueryable implementation (for read-only)
4. Any IQueryable and IUpdatable (for read write)


(Thanks to Jonathon Carter - see his series on ADO.Net Data Services here.

NOTE: For Entities to be supported, they must expose an identifier property in one of the following ways -
a) Have a public property called ID
b) Have a public property called [EntityName]ID
c) Markup a public property with the attribute [DataWebKey]
d) Use the Entity Framework (ADO.Net has built-in support for the EDM Framework and the unique identifier property is understood natively. This is not the case for LINQ to SQL backing classes. You need a), b) or c) above in a partial class if necessary.

Edit

Supported Payload Formats

1. ATOM (the default)
2. JSON




TODO:

1. Basic URL addressing syntax examples 2. Query string options 3. Changing data formats 4. Updating, deleting and adding data

10. Building your own data-source 11. Custom Service Operations

If you would like to comment on this page, click on the Discuss button located on the top-right of each page. Feel free to edit any mistakes or ommissions you find. If you have an objection or find in-appropriate content then contact the administrator. This website is not affiliated with Microsoft®, all content and opinions are those of the specific author and some advice, solutions and article may contain un-intentional errors - please use care. Powered by ScrewTurn Wiki version 2.0.33. Some of the icons created by FamFamFam.