Past Releases of Entity Framework
The first version of Entity Framework was released in 2008, as part of .NET Framework 3.5 SP1 and Visual Studio 2008 SP1.
Starting with the EF4.1 release it has shipped as the EntityFramework NuGet Package - currently one of the most popular packages on NuGet.org.
Between versions 4.1 and 5.0, the EntityFramework NuGet package extended the EF libraries that shipped as part of .NET Framework.
Starting with version 6, EF became an open source project and also moved completely out of band form the .NET Framework. This means that when you add the EntityFramework version 6 NuGet package to an application, you are getting a complete copy of the EF library that does not depend on the EF bits that ship as part of .NET Framework. This helped somewhat accelerate the pace of development and delivery of new features.
In June 2016, we released EF Core 1.0. EF Core is based on a new codebase and is designed as a more lightweight and extensible version of EF. Currently EF Core is the main focus of development for the Entity Framework Team at Microsoft. This means there are no new major features planned for EF6. However EF6 is still maintained as an open source project and a supported Microsoft product.
Here is the list of past releases, in reverse chronological order, with information on the new features that were introduced in each release.
The EF 6.1.3 runtime was released to NuGet in October of 2015. This release contains only fixes to high-priority defects and regressions reported on the 6.1.2 release. The fixes include:
- Query: Regression in EF 6.1.2: OUTER APPLY introduced and more complex queries for 1:1 relationships and “let” clause
- TPT problem with hiding base class property in inherited class
- DbMigration.Sql fails when the word ‘go’ is contained in the text
- Create compatibility flag for UnionAll and Intersect flattening support
- Query with multiple Includes does not work in 6.1.2 (working in 6.1.1)
- “You have an error in your SQL syntax” exception after upgrading from EF 6.1.1 to 6.1.2
The EF 6.1.2 runtime was released to NuGet in December of 2014. This version is mostly about bug fixes. We also accepted a couple of noteworthy changes from members of the community:
- Query cache parameters can be configured from the app/web.configuration file
<entityFramework> <queryCache size='1000' cleaningIntervalInSeconds='-1'/> </entityFramework>
- SqlFile and SqlResource methods on DbMigration allow you to run a SQL script stored as a file or embedded resource.
The EF 6.1.1 runtime was released to NuGet in June of 2014. This version contains fixes for issues that a number of people have encountered. Among others:
- Designer: Error opening EF5 edmx with decimal precision in EF6 designer
- Default instance detection logic for LocalDB doesn't work with SQL Server 2014
The EF 6.1.0 runtime was released to NuGet in March of 2014. This minor update includes a significant number of new features:
- Tooling consolidation provides a consistent way to create a new EF model. This feature extends the ADO.NET Entity Data Model wizard to support creating Code First models, including reverse engineering from an existing database. These features were previously available in Beta quality in the EF Power Tools.
- Handling of transaction commit failures provides the CommitFailureHandler which makes use of the newly introduced ability to intercept transaction operations. The CommitFailureHandler allows automatic recovery from connection failures whilst committing a transaction.
- IndexAttribute allows indexes to be specified by placing an
[Index]attribute on a property (or properties) in your Code First model. Code First will then create a corresponding index in the database.
- The public mapping API provides access to the information EF has on how properties and types are mapped to columns and tables in the database. In past releases this API was internal.
- Ability to configure interceptors via the App/Web.config file allows interceptors to be added without recompiling the application.
- System.Data.Entity.Infrastructure.Interception.DatabaseLoggeris a new interceptor that makes it easy to log all database operations to a file. In combination with the previous feature, this allows you to easily switch on logging of database operations for a deployed application, without the need to recompile.
- Migrations model change detection has been improved so that scaffolded migrations are more accurate; performance of the change detection process has also been enhanced.
- Performance improvements including reduced database operations during initialization, optimizations for null equality comparison in LINQ queries, faster view generation (model creation) in more scenarios, and more efficient materialization of tracked entities with multiple associations.
The EF 6.0.2 runtime was released to NuGet in December of 2013. This patch release is limited to fixing issues that were introduced in the EF6 release (regressions in performance/behavior since EF5).
The EF 6.0.1 runtime was released to NuGet in October of 2013 simultaneously with EF 6.0.0, because the latter was embedded in a version of Visual Studio that had locked down a few months before. This patch release is limited to fixing issues that were introduced in the EF6 release (regressions in performance/behavior since EF5). The most notable changes were to fix some performance issues during warm-up for EF models. This was important as warm-up performance was an area of focus in EF6 and these issues were negating some of the other performance gains made in EF6.
The EF 6.0.0 runtime was released to NuGet in October of 2013. This is the first version in which a complete EF runtime is included in the EntityFramework NuGet Package which does not depend on the EF bits that are part of the .NET Framework. Moving the remaining parts of the runtime to the NuGet package required a number of breaking change for existing code. See the section on Upgrading to Entity Framework 6 for more details on the manual steps required to upgrade.
This release includes numerous new features. The following features work for models created with Code First or the EF Designer:
- Async Query and Save adds support for the task-based asynchronous patterns that were introduced in .NET 4.5.
- Connection Resiliency enables automatic recovery from transient connection failures.
- Code-Based Configuration gives you the option of performing configuration – that was traditionally performed in a config file – in code.
- Dependency Resolution introduces support for the Service Locator pattern and we've factored out some pieces of functionality that can be replaced with custom implementations.
- Interception/SQL logging provides low-level building blocks for interception of EF operations with simple SQL logging built on top.
- Testability improvements make it easier to create test doubles for DbContext and DbSet when using a mocking framework or writing your own test doubles.
- DbContext can now be created with a DbConnection that is already opened which enables scenarios where it would be helpful if the connection could be open when creating the context (such as sharing a connection between components where you can not guarantee the state of the connection).
- Improved Transaction Support provides support for a transaction external to the framework as well as improved ways of creating a transaction within the Framework.
- Enums, Spatial and Better Performance on .NET 4.0 - By moving the core components that used to be in the .NET Framework into the EF NuGet package we are now able to offer enum support, spatial data types and the performance improvements from EF5 on .NET 4.0.
- Improved performance of Enumerable.Contains in LINQ queries.
- Improved warm up time (view generation), especially for large models.
- Pluggable Pluralization & Singularization Service.
- Custom implementations of Equals or GetHashCode on entity classes are now supported.
- DbSet.AddRange/RemoveRange provides an optimized way to add or remove multiple entities from a set.
- DbChangeTracker.HasChanges provides an easy and efficient way to see if there are any pending changes to be saved to the database.
- SqlCeFunctions provides a SQL Compact equivalent to the SqlFunctions.
The following features apply to Code First only:
- Custom Code First Conventions allow write your own conventions to help avoid repetitive configuration. We provide a simple API for lightweight conventions as well as some more complex building blocks to allow you to author more complicated conventions.
- Code First Mapping to Insert/Update/Delete Stored Procedures is now supported.
- Idempotent migrations scripts allow you to generate a SQL script that can upgrade a database at any version up to the latest version.
- Configurable Migrations History Table allows you to customize the definition of the migrations history table. This is particularly useful for database providers that require the appropriate data types etc. to be specified for the Migrations History table to work correctly.
- Multiple Contexts per Database removes the previous limitation of one Code First model per database when using Migrations or when Code First automatically created the database for you.
- DbModelBuilder.HasDefaultSchema is a new Code First API that allows the default database schema for a Code First model to be configured in one place. Previously the Code First default schema was hard-coded to "dbo" and the only way to configure the schema to which a table belonged was via the ToTable API.
- DbModelBuilder.Configurations.AddFromAssembly method allows you to easily add all configuration classes defined in an assembly when you are using configuration classes with the Code First Fluent API.
- Custom Migrations Operations enabled you to add additional operations to be used in your code-based migrations.
- Default transaction isolation level is changed to READ_COMMITTED_SNAPSHOT for databases created using Code First, allowing for more scalability and fewer deadlocks.
- Entity and complex types can now be nestedinside classes. |
The EF 5.0.0 runtime was released to NuGet in August of 2012. This release introduces some new features including enum support, table-valued functions, spatial data types and various performance improvements.
The Entity Framework Designer in Visual Studio 2012 also introduces support for multiple-diagrams per model, coloring of shapes on the design surface and batch import of stored procedures.
Here is a list of content we put together specifically for the EF 5 release.
- EF 5 Release Post
- New Features in EF5
- Setting up your model
- Creating a Model
- Connections and Models
- Performance Considerations
- Working with Microsoft SQL Azure
- Configuration File Settings
- Code First
- Code First to a new database (walkthrough and video)
- Code First to an existing database (walkthrough and video)
- Data Annotations
- Fluent API - Configuring/Mapping Properties & Types
- Fluent API - Configuring Relationships
- Fluent API with VB.NET
- Code First Migrations
- Automatic Code First Migrations
- Defining DbSets
- EF Designer
- Model First (walkthrough and video)
- Database First (walkthrough and video)
- Complex Types
- TPT Inheritance Pattern
- TPH Inheritance Pattern
- Query with Stored Procedures
- Stored Procedures with Multiple Result Sets
- Insert, Update & Delete with Stored Procedures
- Map an Entity to Multiple Tables (Entity Splitting)
- Map Multiple Entities to One Table (Table Splitting)
- Defining Queries
- Code Generation Templates
- Reverting to ObjectContext
- Using Your Model
- Working with DbContext
- Querying/Finding Entities
- Working with Relationships
- Loading Related Entities
- Working with Local Data
- N-Tier Applications
- Raw SQL Queries
- Optimistic Concurrency Patterns
- Working with Proxies
- Automatic Detect Changes
- No-Tracking Queries
- The Load Method
- Add/Attach and Entity States
- Working with Property Values
- Data Binding with WPF (Windows Presentation Foundation)
- Data Binding with WinForms (Windows Forms)
The EF 4.3.1 runtime was released to NuGet in February 2012 shortly after EF 4.3.0. This patch release included some bug fixes to the EF 4.3 release and introduced better LocalDB support for customers using EF 4.3 with Visual Studio 2012.
Here is a list of content we put together specifically for the EF 4.3.1 release, most of the content provided for EF 4.1 still applies to EF 4.3 as well.
The EF 4.3.0 runtime was released to NuGet in February of 2012. This release included the new Code First Migrations feature that allows a database created by Code First to be incrementally changed as your Code First model evolves.
Here is a list of content we put together specifically for the EF 4.3 release, most of the content provided for EF 4.1 still applies to EF 4.3 as well:
- EF 4.3 Release Post
- EF 4.3 Code-Based Migrations Walkthrough
- EF 4.3 Automatic Migrations Walkthrough
The EF 4.2.0 runtime was released to NuGet in November of 2011. This release includes bug fixes to the EF 4.1.1 release. Because this release only included bug fixes it could have been the EF 4.1.2 patch release but we opted to move to 4.2 to allow us to move away from the date based patch version numbers we used in the 4.1.x releases and adopt the Semantic Versionsing standard for semantic versioning.
Here is a list of content we put together specifically for the EF 4.2 release, the content provided for EF 4.1 still applies to EF 4.2 as well.
The EF 4.1.10715 runtime was released to NuGet in July of 2011. In addition to bug fixes this patch release introduced some components to make it easier for design time tooling to work with a Code First model. These components are used by Code First Migrations (included in EF 4.3) and the EF Power Tools.
You’ll notice that the strange version number 4.1.10715 of the package. We used to use date based patch versions before we decided to adopt Semantic Versioning. Think of this version as EF 4.1 patch 1 (or EF 4.1.1).
Here is a list of content we put together for the 4.1.1 release:
The EF 4.1.10331 runtime was the first to be published on NuGet, in April of 2011. This release included the simplified DbContext API and the Code First workflow.
You will notice the strange version number, 4.1.10331, which should really have been 4.1. In addition there is a 4.1.10311 version which should have been 4.1.0-rc (the ‘rc’ stands for ‘release candidate’). We used to use date based patch versions before we decided to adopt Semantic Versioning.
Here is a list of content we put together for the 4.1 release. Much of it still applies to later releases of Entity Framework:
- EF 4.1 Release Post
- Code First Walkthrough
- Model & Database First Walkthrough
- SQL Azure Federations and the Entity Framework
This release was included in .NET Framework 4 and Visual Studio 2010, in April of 2010. Important new features in this release included POCO support, foreign key mapping, lazy loading, testability improvements, customizable code generation and the Model First workflow.
Although it was the second release of Entity Framework, it was named EF 4 to align with the .NET Framework version that it shipped with. After this release, we started making Entity Framework available on NuGet and adopted semantic versioning since we were no longer tied to the .NET Framework Version.
Note that some subsequent versions of .NET Framework have shipped with significant updates to the included EF bits. In fact, many of the new features of EF 5.0 were implemented as improvements on these bits. However, in order to rationalize the versioning story for EF, we continue to refer to the EF bits that are part of the .NET Framework as the EF 4.0 runtime, while all newer versions consist of the EntityFramework NuGet Package.
The initial version of Entity Framework was included in .NET 3.5 Service Pack 1 and Visual Studio 2008 SP1, released in August of 2008. This release provided basic O/RM support using the Database First workflow.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.