ADO.NET Data Services ("Project Astoria") CTP is Released

Earlier this day I wrote about the release of ASP.NET 3.5 Extensions Preview release . The ASP.NET 3.5 Extensions Preview is a new release that provides new functionality being added to ASP.NET 3.5 and ADO.NET in 2008. This release delivers a set of new features that target:

  1. Enabling High Productivity Data Scenarios – including MVC, Entity Framework, ADO.NET Data Services and dynamic data
  2. Supporting Test Driven Development – including a powerful and extensible MVC framework
  3. Creating the best server for Rich Clients – including Ajax history support and Silverlight controls for ASP.NET

This release also includes the first CTP of the production version of ADO.NET Data Services (aka "Astoria") .

ADO.NET Data Services

ADO.NET Data Services provide new services that find, manipulate and deliver data over the web using simple URIs. Benefits include an easy and flexible way to access data over the web, while enabling the separation of presentation and data access code.

Astoria team blog:

Astoria DataSource Extender

PhaniRajuYN posted a very interesting post about Astoria DataSource Extender. (You can read my Getting Started With Astoria post to get more details about Astoria). The main issue is that it’s a “Database in the cloud”, which means that your database is hosted on the Web.

PhaniRajuYN Extender helps one retrieve data and post data to a database on Astoria using JavaScript.
The Extender encapsulates its own Server-Side handler so that  you don’t have to write a Server-Side proxy to avoid Making Cross-Domain Requests from the Client browser.

You can read the post and download the source and sample from here.

Getting started with Astoria

Few weeks ago, the CTP refresh for VS 2008 Beta 2 of Astoria was released. Astoria is a really cool project based on .NET 3.0 (WFC), Entity Framework to provide pure HTTP access to SQL Server data.In order to play with it, first of all you need to install the following:

After installing all we need, we can create out first project – this post will describe the steps you need in order to do that.

Create new Web Application Project:


After I did it, I need to add new ADO.NET Entity model. On the Project menu, click ‘Add new item’ and select the ADO.NET Entity Data Model.


Now, the wizard will start. Select: Generate model from database.


Next we’ll save the connection info


I checked the option to add connection string to web.config and that’s what I got there:

<add name="NorthwindEntities" connectionString="metadata=~/bin/NorthWind.csdl|~/bin/NorthWind.ssdl|~/bin/NorthWind.msl;
provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.sqlexpress;Initial Catalog=Northwind;
Integrated Security=True&quot;"
providerName="System.Data.EntityClient" />

The next step we select the objects we want. I choose Tables only.


What we got so far? .edmx file was added to our project, which is the schema.


Next step we should add and setup Astoria service. We’ll do it from the Project menu –> Add new item.


New class was generated, it’s not full cause we should select the type of the service.


I added the NorthwindModel.NorthwindEntities type. (NorthwindModel is the model I generated)


Now everything ready to compile…

After compilation, I can browse to the service I created. Look what I got:


The service describes the schema with the object I selected (Tables only).

How can I query the service? For example, if I want all the categories, I’ll change in the address in my browser to: http://localhost:58889/NorthwindWebDataService.svc/Categories and I got all the categories:

(localhost:58889 is on my computer off course, change your host:port to match yours)



What about query it from app? There is a class that comes with the Astoria samples that provides a class and series of methods to create a more encapsulated approach to calling an Astoria web data service. You can find it at the installation folder.

What if I want to query the service to get the customers order by contact name:


and what if I want the top 10 records:



Astoria is set to provide the developers a richer way of interacting with data on the server. The syntax is easy and there is a more structure API on the way for ASP.NET AJAX.


Technorati Tags: ,

Astoria CTP Refresh for Visual Studio 2008 Beta 2

The Astoria team has just released a refresh of the Astoria Prototype CTP to work with Visual Studio Beta 2 and the Entity Framework Beta 2.
The Astoria September 2007 CTP is now available for download.
This CTP is a refresh of the May CTP/Prototype bits recompiled so they run with Visual Studio 2008/Entity Framework Beta 2.
You can visit the Astoria Team Blog for more information.
Technorati Tags: ,

The post also avalable at:

%d bloggers like this: