EF 4.1 Released


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.


We are excited to announce the final Release to Web (RTW) of Microsoft ADO.NET Entity Framework 4.1 (EF 4.1). This is a fully supported, go-live release.


What’s in EF 4.1?

ADO.NET Entity Framework 4.1 introduces two new features:

  • The DbContext API is a simplified abstraction over ObjectContext and a number of other types that were included in previous releases of the ADO.NET Entity Framework. The DbContext API surface is optimized for common tasks and coding patterns. DbContext can be used with Database First, Model First and Code First development.
  • Code First is a new development pattern for the ADO.NET Entity Framework and provides an alternative to the existing Database First and Model First patterns. Code First is focused around defining your model using C#/VB.NET classes, these classes can then be mapped to an existing database or be used to generate a database schema. Additional configuration can be supplied using Data Annotations or via a fluent API.


Getting EF 4.1

ADO.NET Entity Framework 4.1 is available in a couple of places:


Getting Started

There are a number of resources to help you get started with EF 4.1:


Non-English Releases?

This initial release only includes US English IntelliSense, exception messages and Visual Studio item templates. In approximately a month we will also be releasing a series of ‘Language Packs’ that will add localized versions of these resources to an existing EF 4.1 install. These language packs will be available for the same language set as Visual Studio 2010.



This release can be used in a live operating environment subject to the terms in the License Terms. The ADO.NET Entity Framework Forum can be used for questions relating to this release.


What Changed Since EF 4.1 Release Candidate?

The new features in ADO.NET Entity Framework 4.1 were previously available in a Release Candidate. The changes between RC and RTW are mostly bug fixes with one exception:

  • Change of default length for non-key string and binary columns from ‘128’ to ‘Max’. SQL Compact does not support ‘Max’ columns, when running against SQL Compact an additional Code First convention will set a default length of 4000. There are more details about the change included in a recent blog post.


What’s Not in EF 4.1?

There are a number of commonly requested features that did not make it into EF 4.1. We appreciate that these are really important to you and our team has started work on a number of them already, we will be reaching out for your feedback on these features soon:

  • Enum support
  • Spatial data type support
  • Stored Procedure support in Code First
  • Migration support in Code First
  • Customizable conventions in Code First


Thank You

It has been great to have so much community involvement helping us drive the new features in EF 4.1. We thank you for giving us your valuable input and look forward to working together on the next release.

ADO.NET Entity Framework Team