Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
ADO.NET
 What's New in ADO.NET
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2010/.NET Framework 4.0

Other versions are also available for the following:
.NET Framework 4
What's New in ADO.NET

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The following features are new in ADO.NET with the .NET Framework version 4.

ADO.NET supports specifying a connection plan in a SqlConnection..::.ConnectionString. For more information, see SQL Server Connection Director (ADO.NET).

The Entity Framework decreases the amount of coding and maintenance required for data-driven applications by enabling you to program against data models defined in terms of entities and relationships. For more information, see Entity Framework Overview.

The features described below are new to the Entity Framework in .NET Framework 4.

Foreign Keys in the Conceptual Model

You can create conceptual models in which foreign key columns in the database correspond to scalar properties on entity types. For more information, see Defining and Managing Relationships.

New Methods for N-Tier Application Development

New methods on classes in the System.Data.Objects namespace make it easier to develop N-Tier applications. For more information, see N-Tier Applications With Entity Framework.

EntityDataSource Support for the QueryExtender Control

The EntityDataSource control now supports the QueryExtender control, which is used to create filters for data retrieved from a data source. For more information, see Applying LINQ Queries to EntityDataSource.

Testability with IObjectSet<T>

The ObjectContext class now returns typed ObjectSet<(Of <(TEntity>)>) objects that you can use to perform create, read, update, and delete operations on entity objects. For more information, see Working with ObjectSet and Testing with IobjectSet.

Direct Execution of Store Commands

You can now directly execute store commands from the ObjectContext. For more information, see Directly Executing Store Commands.

Persistence-Ignorant Objects

You can use your own custom data classes together with your data model without making any modifications to the data classes themselves. This means that you can use "plain old" CLR objects (POCO), such as existing domain objects, with your Entity Framework application. For more information, see Persistence Ignorant Objects (Entity Framework).

Lazy Loading of Related Objects

With lazy loading, also known as deferred loading, related objects are automatically loaded from the data source when you access a navigation property. For more information, see Shaping Query Results (Entity Framework).

Functions in LINQ to Entities Queries

The EntityFunctions and SqlFunctions classes provide access to canonical and database functions from LINQ to Entities queries. The EdmFunctionAttribute allows a CLR method to serve as a proxy for a function defined in the conceptual model or storage model. For more information, see Calling Functions in LINQ to Entities Queries.

OrderBy Improvements in LINQ to Entities

LINQ to Entities queries that contain an OrderBy operator now return results ordered by the argument specified in the operator, regardless of the position of the operator in the query. However, the OrderBy operator in Entity SQL and ObjectQuery<(Of <(T>)>) queries is ignored if it is not the last operator in the query.

Customized Object-Layer Code Generation

You can configure the ADO.NET Entity Data Model Designer to use text templates to generate customized object-layer code. For more information, see How to: Customize Object-Layer Code Generation.

Model-First Support

The Generate Database Wizard enables you to do conceptual modeling first, and then create a database that supports the model. For more information, see How to: Generate a Database from a Conceptual Model.

Complex Type Support

Naming Service

The Entity Data Model Wizard and the Update Model Wizard provide the option of using singular or plural forms of Entity, EntitySet, and NavigationProperty names to make application code more readable. For more information, see Choose Your Database Objects Dialog Box (Entity Data Model Wizard) and Choose Your Database Objects Dialog Box (Update Model Wizard).

Improved Model Browser Functionality

The Model Browser window of the ADO.NET Entity Data Model Designer enables you to delete objects from the storage model and to search the conceptual and storage models for a specified string. For more information, see Model Browser Window and How to: Delete Objects from the Storage Model.

Entity Designer Extensibility

You can extend the functionality of the ADO.NET Entity Data Model Tools by using classes in the Microsoft.Data.Entity.Design.Extensibility namespace to write Visual Studio extensions. Classes in the Microsoft.Data.Entity.Design.Extensibility namespace allow you to do the following:

  • Extend the .edmx file generation process.

  • Extend the .edmx file update process.

  • Add custom properties to objects in the Entity Designer and Model Browser.

  • Load and save custom file formats.

  • Extend the .edmx file loading and saving processes.

For more information, see Extending the Entity Data Model Tools.

Entity Data Model Documentation

The documentation for the Entity Data Model has been updated. For more information, see Entity Data Model.

ADO.NET Data Services consists of a combination of patterns and libraries that enable you to create and access data services for the Web or an intranet. For more information, see ADO.NET Data Services.

The features below are new to ADO.NET Data Services in .NET Framework 4.

Data Binding

A new DataServiceCollection<(Of <(T>)>) class provides simplified binding of data service data to Windows Presentation Framework (WPF) controls. This class inherits from the ObservableCollection<(Of <(T>)>) class to automatically update bound data when there are changes to data in bound controls. For more information, see Binding Data to Controls (ADO.NET Data Services).

Counting Entities in an Entity Set

A new $count path segment enables you to receive only the total number of resources returned by a URI. For more information, see Special Resource Paths (ADO.NET Data Services).

A new $inlinecount query option enables you to receive the same total resource count together with the resource data in a single response. For more information, see Query Expressions (ADO.NET Data Services).

The .NET Framework client library has been updated to enable you to access this row count information in a query response in your application. For more information, see Querying the Data Service (ADO.NET Data Services).

Server-Driven Paging

A data service can now be configured to return requested resources as a set of paged responses. For more information, see Configuring the Data Service (ADO.NET Data Services).

The .NET Framework client library has been updated to enable you to handle paged responses. For more information, see Loading Deferred Content (ADO.NET Data Services).

Query Projections

Query results can now be projected into arbitrarily defined types by using the new $select query option. For more information, see Query Expressions (ADO.NET Data Services).

The .NET Framework client library has been updated to support projection by using the select clause (Select in Visual Basic) in a LINQ query. For more information, see Query Projections (ADO.NET Data Services).

Custom Data Service Providers

By implementing a set of new data service provider interfaces, you can use various types of data with a data service, even when the data model changes during execution. For more information, see Data Services Providers (ADO.NET Data Services).

Streaming of Binary Resources

According to the AtomPub specification, an entity can be defined as Media Link Entry, with a link to an associated Media Resource. This enables you to retrieve and save binary large object data independent of the entity to which it belongs. You can create a data service that returns binary property data as a stream instead of first loading the entire entity, including binary data, into memory. Do this by implementing the IDataServiceStreamProvider interface.

The .NET Framework client library has been updated to allow you to get and set binary properties as a data stream. For more information, see Loading Deferred Content (ADO.NET Data Services).

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker