How to create and then to call ADO.NET Data Services for different data sources that include the ADO.NET Entity Framework, LINQ to SQL, and the reflection provider

Article translations Article translations
Close Close
Article ID: 982497 - View products that this article applies to.
Rapid publishing disclaimer
Microsoft corporation and/or its respective suppliers make no representations about the suitability, reliability, or accuracy of the information and related graphics contained herein. All such information and related graphics are provided "as is" without warranty of any kind. Microsoft and/or its respective suppliers hereby disclaim all warranties and conditions with regard to this information and related graphics, including all implied warranties and conditions of merchantability, fitness for a particular purpose, workmanlike effort, title and non-infringement. You specifically agree that in no event shall Microsoft and/or its suppliers be liable for any direct, indirect, punitive, incidental, special, consequential damages or any damages whatsoever including, without limitation, damages for loss of use, data or profits, arising out of or in any way connected with the use of or inability to use the information and related graphics contained herein, whether based on contract, tort, negligence, strict liability or otherwise, even if Microsoft or any of its suppliers has been advised of the possibility of damages.
Expand all | Collapse all

On This Page

INTRODUCTION

This article describes an All-In-One Code Framework sample that is available for download. This code sample includes a step-by-step guide for how to create and then to call Microsoft ADO.NET Data Services for different data sources. These data sources include the ADO.NET Entity Framework, LINQ to SQL, and the reflection provider.

Difficulty level

Collapse this imageExpand this image
codefx Medium

Download information

To download this code sample, click the following link:

  

Technical overview

ADO.NET Data Services consists of a combination of patterns and libraries that enables data services for the Web to be created and consumed. The goal of ADO.NET Data Services is to facilitate the creation of flexible data services that can be integrated naturally with the Web. Therefore, ADO.NET Data Services uses Uniform Resource Identifiers (URIs) to point to pieces of data and then uses simple, well-known formats to represent that data. Examples of these formats include JSON and ATOM (XML-based feed format. This behavior leads to the data service being surfaced as a REST-style resource collection that can be addressed by using URIs. Additionally, agents can interact with the data service by using standard HTTP verbs such as GET, POST, PUT or DELETE.

In order for the system to understand and to leverage semantics over the data that is surfacing, ADO.NET Data Services models the data that is exposed through the data service by using a model called Entity Data Model (EDM) and Entity-Relationship derivative. This model organizes the data into the form of instances of “entity types,” of “entities,” and of the associations between them.

For relational data, ADO.NET Data Services supports exposing an EDM model that is created by using the ADO.NET Entity Framework. To enable all other data sources to use additional database access technologies (such as LINQ to SQL), a mechanism is provided which enables any data source to be modeled as entities and as associations. This means that any data source can be described by using an EDM schema. This mechanism also enables any data source to be exposed as a data service.

This All-In-One Code Framework sample shows how to create and to call ADO.NET Data Services to perform Create, Read, Update, and Delete (CRUD) operations on different data sources. These data sources include the ADO.NET Entity Framework, LINQ to SQL, and the reflection provider.

Note For more information about how to create the sample application and how to deploy the sample application, see the Readme.txt file that is included in the download package.

Technology category

  • ADO.NET
  • ADO.NET Data Services

Languages

This code sample contains the following programming languages:
Collapse this tableExpand this table
LanguageProject Name
Visual C#CSADONETDataService
Visual Basic .NETVBADONETDataService

Prerequisites

  • You must first deploy the SQLServer2005DB database by running the SQLServerDB.sql script. Then, you must modify the connection string in the Web.config file according to your database instance and login account. For more details, refer to the Readme.txt file that is included in the downloaded package.
  • This sample application was created by using Visual Studio 2008 Service Pack 1.

Tags

  • ADO.NET Data Services, Entity Framework, LINQ to SQL

MORE INFORMATION

What is All-In-One Code Framework?

All-In-One Code Framework shows most Microsoft development techniques by using code samples in different programming languages. Each example is carefully selected, composed, and documented to show one common code scenario. For more information about All-In-One Code Framework, visit the following Web site:
http://cfx.codeplex.com

How to find more All-In-One Code Framework samples

To find more All-In-One Code Framework samples, you can search for kbcodefx together with related keywords on support.microsoft.com. Or, you can simply click the following link:
http://support.microsoft.com/search/default.aspx?query=kbcodefx

REFERENCES

For more information, visit the following Microsoft Developer Network (MSDN) Web sites:

Properties

Article ID: 982497 - Last Review: April 29, 2010 - Revision: 1.1
APPLIES TO
  • Microsoft Visual Studio 2008 Service Pack 1
Keywords: 
kbsurveynew kbinfo kbnomt kbrapidpub kbcodefx atdownload KB982497

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com