women holding up number 2012

Visual Studio 2012's New Database Features

Following on the heels of the SQL Server 2012 release earlier this year, Microsoft recently released Visual Studio 2012. As I covered in a previous article, "Top New Features in Visual Studio 2012," Visual Studio 2012 offers many new features for developing Windows 8 and Windows Phone applications. Visual Studio 2012 also has several new database-related enhancements. Here are the most important ones.

New SQL Server Object Explorer

Visual Studio has always been weak in the area of SQL Server navigation. However, the new Visual Studio 2012 SQL Server Object Explorer allows multiple database navigation and drill down, and it displays column data types as well as primary and foreign keys. This new SQL Server Object Explorer is now much more like SQL Server Management Studio (SSMS) than the old Server Explorer, which was quite limited in the information it displayed.

New Table Designer

The new Visual Studio 2012 Table Designer lets you define a table graphically, making it easier to understand its related objects. The new Table Designer is bi-directional: Changing the table definition through a graphical interface updates the Script pane. Likewise, changes to the Script pane update the graphical designer. The new Table Designer is available only for databases in the SQL Server 2012 format.

Support for SQL Server LocalDB

The SQL Server Express LocalDB engine is used to provide local database access for Visual Studio applications. LocalDB is a version of SQL Server that runs in user mode—not as a service. For developers, it's primarily intended to help test code for deployments. It uses the same sqlservr.exe program as the other versions and is 100 percent code compatible with the full-featured versions of SQL Server 2012. Earlier versions of Visual Studio used SQL Server Express. If you migrate your earlier Visual Studio projects to Visual Studio 2012, their database connections will be changed from SQL Server Express to SQL Server LocalDB.

.NET Framework 4.5 Data Provider for SQL Server (System.Data.SqlClient)

SqlClient now supports SQL Server 2012's new AlwaysOn high availability, disaster recovery feature. New streaming support makes it easier to work with BLOBs and unstructured data by eliminating the need to fully load the object data into memory. Connection failures will now be logged in the extended events log. In addition, support has been added for asynchronous programming.

Entity Framework 5.0

Although it’s no longer technically a part of the .NET Framework, there’s also a new version of the Entity Framework. The Entity Framework is built on the .NET Framework, and the latest version includes support for the dbGeography and dbGeometry spatial data types. In addition, it offers support for table-valued function with the database-first method as well as support for multiple diagrams per model. The Entity Framework 5 can be installed only by using NuGet. You can download the NuGet installer package for the Entity Framework 5.0 from nuget.org. NuGet is a Visual Studio extension that helps you to install libraries and tools into Visual Studio.

Try It Out

You can learn more about the new Visual Studio 2012 database features by downloading a trial copy of Visual Studio 2012. Many of these features are also in the free Visual Studio Express 2012 editions.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.