Friday, May 8, 2009

Using Visual Studio 2008 SP1 (RTM) : Now we can use Add Service Reference options to Add ADO.NET Data Service Reference.

Before  Visual Studio 2008 SP1  to add a  ADO.NET Data Service  Reference (Proxy) we use  Datasvcutil.exe . Using  this tool we generate the Client side proxy and add that file in client side project  . Now using Visual Studio 2008 SP1 RTM simple we can use  Add Service Reference Options. (This is same as adding WCF Service Reference). 

First Create a Simple ADO.NET Data Service  selecting the following template. ( Add this template in ASP.NET Web Application).

image

Next Add  ADO.NET Entity Data Model or LINQ To SQL to the same project

image

Follow the Entity Data Model Wizard.

image

Here is the my  ADO.NET Data Service.

image

Now i am going to add this Service into my  Silver Light project using Add Service Reference options as shown below. ( This is same as  Adding WCF service Reference.)

image

image

After adding the service  to the client project Visual Studio generates all the client side classes , adds the references. now you can consume the service as shown below

image

Nandri( Thank you).

Sreenivasaragavan.

No comments: