EF6 Alpha 2 Available on NuGet

 


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.


 

Around a month ago we released the first alpha of EF6. Today we are pleased to announce that availability of Alpha 2. 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 2 are likely to change significantly 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 2

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 1

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

  • 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. 
  • Custom Code First Conventions have evolved significantly since Alpha 1 based on your feedback and further design. We have updated the walkthough for this feature and the feature specification on our CodePlex site. 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.
  • 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.

What Else is New in EF6

The following features are included in Alpha 2 but have not changed significantly since Alpha 1:

  • Async Query and Save - EF6 now supports 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.
  • Multiple Contexts per Database (Formerly known as 'Multi-Tenant Migrations') - 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.
  • 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.
  • 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.
  • Dependency Resolution - EF now supports 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.
  • 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.

 

What's after Alpha 2

Our  Roadmap provides details of all the features we are planning to implement in EF6, including the features we haven't started yet. If you want to try out the changes we've made since the last official pre-release, you can use the latest signed nightly build. You can also check out the Feature Specifications page on CodePlex for more information about new features that we are working on. You can also read our Design Meeting Notes to keep track of the evolving design of new features.