Saturday, October 1, 2011

This blog post is compiled from a presentation on Project Juneau in Teched 2011 and it highlights the key features of the product.

SQL Server development is now deeply integrated with Visual Studio Development environment. It enables developers to write T-SQL while working on Entity-Framework projects.

We start by adding an Entity Data Model (edmx) to our project.

choose database project:

Changes to the Data Model (edmx) are instantly propagated to the database. The idea here being, you build the database as you build your application. You don’t need to spend additional time later to synch up the application with an existing data model.

Create association between entities:

No initial setup of database is required. Juneau creates a localDB to work with using SQL Server Denali’s feature called Local DB Runtime. The local DB Runtime is a on-demand, file-based local DB instance that can be used with the Visual Studio Project for debugging and testing.

Create Database Snapshots using SQLX files and refer them in your app. Shapshot is a point-in-time reference of your database in your project. You can then refer the SQLX Snapshot than the database project – similar to referring a DLL in your project. Snapshots can also be created from a live database.

Once you create your snapshot, you can then publish your changes to your database:

Output:

After deployment, you can continue to work on your application without your database by referring to the SQLX snapshot. With Snapshots, we can also do a schema compare – this is helpful in identifying the changes between the two snapshots.