For me, it means fundamentally ‘Code First approach’, which is actually the best approach for DDD (Domain Driven Design) architectural styles (for your Domain Entity Model). So now, it is ready for production developments!!.
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:
- Download the stand alone installer
- Add the ‘EntityFramework’ NuGet package to your project
Note: The NuGet package only includes the EF 4.1 runtime and does not include the Visual Studio item templates for using DbContext with Model First and Database First development.
There are a number of resources to help you get started with EF 4.1:
- ADO.NET Entity Framework page on the MSDN Data Developer Center
There is lots of great new content on this site, including ‘Getting Started’ videos for the new features in EF 4.1
- MSDN Documentation
- ADO.NET Entity Framework Forum
- Code First walkthrough
- Model First / Database First walkthrough
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.