Introducing ADO.NET Data Services

Joydip Kanjilal briefly introduces ADO.NET Data Services.

Joydip Kanjilal

October 30, 2009

3 Min Read
ITPro Today logo in a gray background | ITPro Today

asp:Feature

 

Introducing ADO.NET Data Services

 

By Joydip Kanjilal

 

ADO.NETData Services can be used to expose an application s data as a service so thatit can be consumed by Web applications. You can use ADO.NETData Services to isolate the presentation and data access layers of yourapplication and discover, manipulate, and retrieve data in a corporate network.This article takes a brief look at what ADO.NETData Services are, the features and benefits, and how they can be integratedwith ADO.NETEntity Framework to expose the application s data as a data service.

 

The Prerequisites

You should have the following installed in your system towork with ADO.NETData Services:

  • Microsoft Visual Studio 2008

  • Microsoft SQL Server 2005 or SQL Server Express

  • ASP.NET Extensions CTP

  • ADO.NET Entity Framework Beta 3

  • ADO.NET Entity Framework Tools CTP

 

What Are ADO.NET Data Services?

The Astoria team says, ADO.NETData Services (also known as Project code name Astoria ) consists of acombination of patterns and libraries that enables any data store to be exposedas a flexible data service, naturally integrating with the Web, that can beconsumed by Web clients within a corporate network or across the Internet. Youcan use ADO.NETData Services to expose data through Web services in terms of EDM abstractions,i.e., as Entity Data Model (EDM) objects. These objects can then be accessed byany Web application much the same way a Web service is accessed. To learn more aboutthe ADO.NETEntity Framework and Entity Data Model, take a look at my article titled Objectify Your Application s Data.

 

In the section that follows, we ll take a step-by-steplook at how to get started with ADO.NETData Services.

 

Getting Started

Follow these simple steps to get started with ADO.NETData Services:

  • Click on File | New | New Web Site in VisualStudio

  • Choose ASP.NET Web Site from the list of theVisual Studio Installed templates and save it with a name as shown in Figure 1.

  • Next, right-click on the project in the solutionexplorer and choose Add New Item.

  • Select ADO.NETData Service from the list of the templates displayed and click Add (see Figure2).

  • Now add LINQ to SQL classes in your project (seeFigure 3).

  • Then configure the data service to use the datacontext.

 


Figure 1

 


Figure 2

 


Figure 3

 

You re done! You can now call this data service from your Webapplications to locate and manipulate data in your applications.

 

You can get more information about ADO.NETData Services and the ADO.NETEntity Framework in my upcoming book, DataPersistence with ADO.NET EntityFramework (Packt Publishing).

 

Conclusion

ADO.NETData Services are great in the sense that you can expose your application sdata as a service, then consume it from Web applications through HTTP requestsand perform CRUD operations seamlessly. Wikipedia states, ADO.NETData Services (codename Astoria )is a platform for what Microsoft calls Data Services. It is actually acombination of the runtime and a web service through which the services areexposed. In addition, it also includes the Data Services Toolkit which letsAstoria Data Services be created from within ASP.NETitself. (http://en.wikipedia.org/wiki/ADO.NET_Data_Services)

 

This article has had a brief look at what ADO.NET DataServices are, the features, and how we can get started.

 

Joydip Kanjilal isa Microsoft MVP in ASP.NET. He has more than 12 years of industry experience inIT with more than six years in Microsoft .NET and its related technologies. Hehas authored articles for some of the most reputable sites, including http://www.asptoday.com, http://www.devx.com, http://www.aspalliance.com, http://www.aspnetpro.com, http://www.sql-server-performance.com,and http://www.sswug.com. Many of thesearticles have been selected at http://www.asp.net,Microsoft s official site for ASP.NET. Joydip was also a community credit winnerat http://www.community-credit.coma number of times. He is currently working as a Lead Architect in a reputablecompany in Hyderabad, India. He has years of experience in designing andarchitecting solutions for various domains. His technical strengths include, C,C++, VC++, Java, C#, Microsoft .NET, AJAX, Design Patterns, SQL Server,Operating Systems, and Computer Architecture. Joydip blogs at http://aspadvice.com/blogs/joydipand spends most of his time reading books and blogs, and writing books andarticles. His hobbies include watching cricket and soccer and playing chess.

 

 

 

 

Read more about:

Microsoft
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like