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
New Methods for N-Tier Application Development
EntityDataSource Support for the QueryExtender Control
Testability with IObjectSet<T>
Direct Execution of 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 Working with POCO Entities (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
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
Model-First Support
Complex Type Support
Naming Service
Improved Model Browser Functionality
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.