EF 4.1 Is Coming (DbContext API & Code First RTW)


The information in this post is out of date.

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


Our latest EF Feature Community Technology Preview (CTP5) has been out for a few months now. Since releasing CTP5 our team has been working hard on tidying up the API surface, implementing changes based on your feedback and getting the quality up to production ready standards.  At the time CTP5 was released we also announced that we would be releasing a production ready go-live in Q1 of 2011 and we are on track to deliver on the commitment.

Our plan is to deliver a Go-Live Release Candidate version of the DbContext API and Code First in mid to late March. This Release Candidate will be titled ADO.NET Entity Framework 4.1. Approximately a month after the RC ships we plan to release the final Release to Web (RTW). We are not planning any changes to the API surface or behavior between RC and RTW, the release is purely to allow any new bugs found in the RC build to be evaluated and potentially fixed.


Why ADO.NET Entity Framework 4.1?

This is the first time we’ve released part of the Entity Framework as a stand-alone release and we’re excited about the ability to get new features into your hands faster than waiting for the next full .NET Framework release. We plan to release more features like this in the future.  We chose to name the release EF 4.1 because it builds on top of the work we did in version 4.0 of the .NET Framework.


Where is it Shipping?

EF 4.1 will be available as a stand-alone installer that will install the runtime DbContext API and Code First components, as well as the Visual Studio Item Templates that allow using the new DbContext API surface with Model First and Database First development. We also plan to make the bits available as a NuGet package.


What’s Coming in RC/RTW?

The majority of our work involves small API tweaks and improving quality but there are a few changes coming in the RC that we want to give you a heads up about.

  • Rename of DbDatabase
    We heard you, admittedly the name was a little strange. It is going back to ‘Database’ for RC/RTW.
  • Rename of ModelBuilder
    To align with the other core classes ModelBuilder will become DbModelBuilder.
  • Validation in Model First and Database First
    The new validation feature was only supported in Code First in CTP5. In RC the validation feature will work with all three development workflows (Model First, Database First, and Code First).
  • Intellisense and online docs
    We’ve held off on extensively documenting the CTPs because the API surface has been changing so much. RC will have intellisense and online documentation.
  • Removing Code First Pluggable Conventions
    This was a very painful decision but we have decided to remove the ability to add custom conventions for our first RC/RTW. It has become apparent we need to do some work to improve the usability of this feature and unfortunately we couldn’t find time in the schedule to do this and get quality up the required level. You will still be able to remove our default conventions in RC/RTW.

There are also a few common requests that are not going to be available in the RC/RTW, we really want to address these scenarios and plan to do so in coming releases. We’ve had overwhelming feedback asking for a go-live release though and have decided to finish our current feature set and ship it.

  • Code First bulk column renaming not supported
    On a few forum threads we had discussed possibly re-enabling the ability to rename columns when specifying properties to be mapped, i.e. modelBuilder.Entity<Person>().Map(m => m.Properties(p => new { person_id = i.Id, person_name = p.Name }));
    This is not going to be supported in our first RC/RTW.
  • No compiled query support from DbContext
    Unfortunately due to some technical limitations in the compiled query functionality we shipped in .NET Framework 4.0 we are unable to support compiled queries via the DbContext API. We realize this is a painful limitation and will work to enable this for the next release.
  • No stored procedure support in Code First
    The ability to map to stored procedures is a common request but is not going to be available in our first RC/RTW of Code First. We realize this is an important scenario and plan to enable it in the future but didn’t want to hold up a go-live release for it.


Database Schema Evolution (Migrations)

One of the most common requests we get is for a solution that will evolve the database schema as your Code First model changes over time. We are working on this at the moment but we’ve also heard strong feedback that this shouldn’t hold up the RTW of Code First. In light of this our team has been focusing on getting the current feature set production ready.  Hence a schema evolution solution will not be available for our first RTW. You’ll start to see more on this feature once we have RTW released.


Thank You

It has been great to have so much community involvement helping us drive these features, we thank you for giving us your valuable input.

ADO.NET Entity Framework Team