Entity Framework版本汇总

Entity Framework Version Summary

The following table summarizes the key new features for each version of Entity Framework.

Entity Framework Version .NET/Visual Studio Version Major New Features New Code Generation T4 Templates

Entity Framework 1.0

.NET 3.5 SP1/Visual Studio 2008 SP1

Entity Designer included with Visual Studio.

The ObjectContext API.

An .edmx file.

The EntityClient data provider.

The EntityDataSource control.

For more information, see What’s New in ADO.NET.

ADO.NET EntityObject Generator -

generates a strongly-typed ObjectContext class and persistence-aware entity classes.

Entity Framework 4.0

.NET 4/Visual Studio 2010

Model-First support.

Foreign Keys in the conceptual Model.

Lazy loading.

Persistence-Ignorant Objects (POCO) support.

Self-Tracking Entities for N-Tier application development.

What’s New in ADO.NET

ADO.NET Self-Tracking Entity Generator -

generates a strongly-typed ObjectContext class and self-tracking entity classes.

ADO.NET POCO Entity Generator-

generates a strongly-typed ObjectContext class and persistence ignorant entity classes.

POCO Entity Generator template is available through visual studio gallery.

Entity Framework 4.1

.NET 4/Visual Studio 2010

The DbContext API. 

DbContext Code Generator templates.

Validation features.

For more information, see What's New in Entity Framework 4.1.

ADO.NET DbContext Generator-

generates a strongly-typed DbContext class and persistence ignorant entity classes.

DbContext Code Generator templates are available through visual studio gallery.

Note:
Starting with Entity Framework 4.1 DbContext Generator is the recommended template.

Entity Framework 4.2

.NET 4/Visual Studio 2010

Starting with version 4.2, Entity Framework moved to Semantic Versioning.

For more information, see What's New in Entity Framework 4.2.

Entity Framework 4.3

Entity Framework 4.3.1

.NET 4/Visual Studio 2010

Code First Migrations.

For more information, see What's New in Entity Framework 4.3 and What’s New in EF 4.3.1.

Starting with the Entity Framework 4.3.1, the ADO.NET DbContext Generator templates have been renamed to EF 4.x DbContext Generator.

Entity Framework 5.0 RC

.NET 4.5 Beta/Visual Studio 11 Beta

Note, that you can also use the Entity Framework 5.0 with .NET 4.

However, if you want to use the new features that were added in the Entity Framework 5.0 you must target .NET 4.5.

If you are re-targeting an existing project that references EntityFramework.dll to a different .NET Framework version, you must do the following: uninstall the EntityFramework NuGet package; set the Target Framework value to the .NET Framework version you want; re-install the EntityFramework NuGet package.

The enum data-type support. You can use enum with Model First, Database First, and Code First development.

The Geography and Geometry spatial data-types support. You can use spatial data types with Model First, Database First, and Code First development.

Table-valued Functions (TVFs) defined in your database can now be used with Database First.

Support for multiple result sets returned by a stored procedure.

Support for multiple diagrams for a model.

For more information, see the following topics: What's New in Entity Framework 5.0.

EF 5.x DbContext Generator generates object-layer code that supports Entity Framework 5.0 RC.

你可能感兴趣的:(Entity Framework版本汇总)