Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Development Guide
Data and Modeling
ADO.NET
 What's New in ADO.NET
This page is specific to
Microsoft Visual Studio 11/.NET Framework 4.5

Other versions are also available for the following:
What's New in ADO.NET
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The following features are new in ADO.NET in the .NET Framework 4.5 Developer Preview.

SqlClient Data Provider

The following features are new in the .NET Framework Data Provider for SQL Server in .NET Framework 4.5 Developer Preview:

  • Streaming support from SQL Server to an application supports scenarios where data on the server is unstructured. See SqlClient Streaming Support for more information.

  • Support has been added for asynchronous programming. See Asynchronous Programming for more information.

  • Connection failures will now be logged in the extended events log. For more information, see Data Tracing in ADO.NET.

  • SqlClient now has support for SQL Server's high availability, disaster recovery feature, AlwaysOn. For more information, see SqlClient Support for High Availability, Disaster Recovery.

  • A password can be passed as a SecureString when using SQL Server Authentication. See SqlCredential for more information.

  • When TrustServerCertificate is false and Encrypt is true, the server name (or IP address) in a SQL Server SSL certificate must exactly match the server name (or IP address) specified in the connection string. Otherwise, the connection attempt will fail. For more information, see the description of the Encrypt connection option in ConnectionString.

    If this change causes an existing application to no longer connect, you can fix the application using one of the following:

    • Issue a certificate that specifies the short name in the Common Name (CN) or Subject Alternative Name (SAN) field. This solution will work for database mirroring.

    • Add an alias that maps the short name to the fully-qualified domain name.

    • Use the fully-qualified domain name in the connection string.

  • SqlClient supports Extended Protection. For more information about Extended Protection, see Connecting to the Database Engine Using Extended Protection.

  • SqlClient supports connections to LocalDB databases. For more information, see SqlClient Support for LocalDB.

  • Type System Version=SQL Server 2012; is new value to pass to the Type System Version connection property. The Type System Version=Latest; value is now obsolete and has been made equivalent to Type System Version=SQL Server 2008;. For more information, see ConnectionString.

  • SqlClient now supports sparse columns, a feature that was added in SQL Server 2008. If your application already accesses data in a table that uses sparse columns, you should see an increase in performance. The IsColumnSet column of GetSchemaTable indicates if a column is a sparse column that is a member of a column set. For more information about sparse columns, see Using Sparse Columns.

  • The assembly Microsoft.SqlServer.Types.dll, which contains the spatial data types, has been upgraded from version 10.0 to version 11.0. Applications that reference this assembly may fail. For more information, see Breaking Changes to Database Engine Features.

ADO.NET Entity Framework

The .NET Framework 4.5 Developer Preview adds APIs that enable new scenarios when working with the Entity Framework. This section describes the new Entity Framework improvements and features.

Note, that some functionality of the Entity Framework (for example, working with DbContext, or Code First development) is part of the Entity Framework 5.0. The Entity Framework 5.0 is not part of the .NET Framework, but is built on .NET Framework 4.5. The Entity Framework 5.0 is available as the ‘Entity Framework’ NuGet package. For more information, see Entity Framework Releases and Versioning.

The following features are new in the Entity Framework.

  • Ability to map a property to enum data-type. You can use your enum property just like any other scalar property. You can use the Entity Designer within Visual Studio or Code First development to model entities that have properties of enum type. 

  • Ability to map a property to Geography and Geometry spatial data-types. You can use these types and methods on these types as part of LINQ queries, for example to find the distance between two locations as part of a query. You can use the Entity Designer within Visual Studio or Code First development to model entities that have spatial data-types properties.

  • Ability to work with Table-valued functions (TVFs). You can now add TVFs to your entity data model. A TVF is similar to a stored procedure, but the result of executing the TVF is composable, meaning you can use it as part of a LINQ query. 

  • Support for multiple result sets.  Stored procedures can now have multiple result sets in your entity data model.

  • SQL generation improvements, especially around optimizing queries over models with table-per-type (TPT) inheritance.

  • LINQ queries are now automatically compiled and cached to improve query performance. In previous releases of the Entity Framework, you could use the CompiledQuery class to compile a LINQ query explicitly but starting with this release the compilation happens automatically for LINQ queries.

  • Support for multiple diagrams for a model. Each diagram can contain entities and relationships to make visualizing your model easier. You can switch between diagrams using the Model Browser and include related entities on each diagram as an optional command.

  • The StoreGeneratedPattern for key columns can now be set on an entity Properties window and this value will propagate from your entity model down to the store definition.

  • Ability to batch import your stored procedures as function imports when using the Entity Model Wizard. The result shape of each stored procedure will automatically become a new complex type in your entity model. This makes getting started with stored procedures very easy.

  • The Entity Designer surface now supports selection driven highlighting and entity shape coloring.

  • Support for Entity Framework project and Database Project integration.

See Also

© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker