The information in this post is out of date.

EF6 RTM is now available.

Visit msdn.com/data/ef for the latest information on current and past releases of EF.


 

A couple of months back we released EF6 Alpha 2, since then we've been adding new features, polishing existing features and fixing bugs. Today we are pleased to announce the availability of Alpha 3. EF6 is being developed in an open source code base on CodePlex, see our open source announcement for more details.

 

We Want Your Feedback

You can help us make EF6 a great release by providing feedback and suggestions. You can provide feedback by commenting on this post, commenting on the feature specifications linked below or starting a discussion on our CodePlex site.

 

Support

This is a preview of features that will be available in future releases and is designed to allow you to provide feedback on the design of these features. It is not intended or licensed for use in production. The APIs and functionality included in Alpha 3 are likely to change prior to the final release of EF6.

If you need assistance using the new features, please post questions on Stack Overflow using the entity-framework tag.

 

Getting Started with Alpha 3

The Get It page provides instructions for installing the latest pre-release version of Entity Framework.

Note: In some cases you may need to update your EF5 code to work with EF6, see Updating Applications to use EF6.

 

What's Changed Since Alpha 2

The following features and changes have been implemented since Alpha 2:

  • Code First Mapping to Insert/Update/Delete Stored Procedures is now supported. The feature specification on our CodePlex site provides examples of using this new feature. This feature is still being implemented and does not include full Migrations support in Alpha 3.
  • Connection Resiliency enables automatic recovery from transient connection failures. The feature specification on our CodePlex site shows how to enable this feature and how to create your own retry policies.
  • We accepted a pull request from iceclow that allows you to create custom migrations operations and process them in a custom migrations SQL generator. This blog post provides an example of using this new feature.
  • We accepted a pull request from UnaiZorrilla to provide a pluggable pluralization & singularization service.
  • The new DbContext.Database.UseTransaction and DbContext.Database.BeginTransaction APIs enable scenarios where you need to manage your own transactions.

What Else is New in EF6

The following features and changes are included in Alpha 3 but have not changed significantly since Alpha 2:

  • Async Query and Save adds support for the task-based asynchronous patterns that were introduced in .NET 4.5. We've put together a walkthrough that demonstrates this new feature. You can also view the feature specification on our CodePlex site for more detailed information.
  • 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. We have a walkthough for this feature and the feature specification is on our CodePlex site.
  • 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. The feature specification provides details about this pattern, and we've put together a list of services that can be injected.
  • Code-Based Configuration - Configuration has traditionally been specified in a config file, EF6 also gives you the option of performing configuration in code. We've put together an overview with some examples and there is a feature specification with more details.
  • Configurable Migrations History Table - Some database providers require the appropriate data types etc. to be specified for the Migrations History table to work correctly. The feature specification provides details about how to do this in EF6.
  • Multiple Contexts per Database - In previous versions of EF you were limited to one Code First model per database when using Migrations or when Code First automatically created the database for you, this limitation is now removed. If you want to know more about how we enabled this, check out the feature specification on CodePlex.
  • Updated Provider Model - In previous versions of EF some of the core components were a part of the .NET Framework. In EF6 we've moved all these components into our NuGet package, allowing us to develop and deliver more features in a shorter time frame. This move required some changes to our provider model. We've created a document that details the changes required by providers to support EF6, and provided a list of providers that we are aware of with EF6 support.
  • 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.
  • DbContext can now be created with a DbConnection that is already opened. Find out more about this change on the related work item on our CodePlex site.
  • Improved performance of Enumerable.Contains in LINQ queries. Find out more about this change on the related work item on our CodePlex site.
  • Default transaction isolation level is changed to READ_COMMITTED_SNAPSHOT for databases created using Code First, potentially allowing for more scalability and fewer deadlocks. Find out more about this change on the related work item on our CodePlex site.
  • We accepted a pull request from AlirezaHaghshenas that provides significantly improved warm up time (view generation), especially for large models. View the discussion about this change on our CodePlex site for more information. We're also working on some other changes to further improve warm up time.
  • We accepted a pull request from UnaiZorrilla that adds a DbModelBuilder.Configurations.AddFromAssembly method. If you are using configuration classes with the Code First Fluent API, this method allows you to easily add all configuration classes defined in an assembly. 

 

What's after Alpha 3

Alpha 3 contains all the major features we are planning to implement for the runtime in the EF6 release. We'll now turn our attention to polishing and completing these new features, implementing small improvements, fixing bugs and everything else to make EF6 a great release. We're still accepting pull requests too.

We've also been getting the EF Designer code base updated for the EF6 release and we hope to have a preview of the EF6 designer available soon.

If you want to try out changes we've made since the last official pre-release, you can use the latest signed nightly build. You can also check out our Feature Specifications and Design Meeting Notes to stay up to date with what our team is working on.