Microsoft released today the Release to Web (RTW) of Microsoft ADO.NET Entity Framework 4.1 (EF 4.1). For those who don’t know, the ADO.NET Entity Framework enables developers to create data access applications by programming against a conceptual application model instead of programming directly against a relational storage schema. The goal is to decrease the amount of code and maintenance required for data-oriented applications.
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.
ADO.NET Entity Framework 4.1 is available in two ways:
- By downloading the stand alone installer,
- Or by adding 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.
Also, check out the following resources for more info.
MSDN Resources
- Entity Framework Overview
- Getting Started (Entity Framework)
- Configuring the Entity Framework
- Modeling and Mapping
- Querying a Conceptual Model
- Working with Objects
- Working with Data Providers
- Development and Deployment Considerations
- Language Reference
- Samples
- Entity Framework Resources
- Entity Framework Terminology
Other Resources
- Absolute Beginners Guide to Entity Framework
- EF 4.1 Model & Database First Walkthrough
- EF 4.1 Code First Walkthrough
- Using DbContext in EF 4.1
- Part 1: Introduction and Model
- Part 2: Connections and Models
- Part 3: Finding Entities
- Part 4: Add/Attach and Entity States
- Part 5: Working with Property Values
- Part 6: Loading Related Entities
- Part 7: Local Data
- Part 8: Working with Proxies
- Part 9: Optimistic Concurrency Patterns
- Part 10: Raw SQL Queries
- Part 11: Load and AsNoTracking
- Part 12: Automatically Detecting Changes
Have fun.




















Hi all,
I have used EF for a while. I am used to using an EDMX file for my model. I have also recently used Code First and the DbContext API and I really like this.
Last night I started building an app. and was thinking, am I starting on the right foot? Do I use EDMX or DbContext API? If the thing i’m building turns out to be big, will I have chosen the right technology.
What if I use DbContext API and get it to generate my database. Obviously I don’t want this to keep generating my database down the track when i’m at a stable point in development (or do I?). Then if I want to tweak my database or domain model will all the strings come un done?
The DbContext API is a simplified version. Will it do everything I need? I dont think ill need stored procedures as I can do everything with linq.
So my real question is. If I am building something that is serious and out there is the real word and it may turn out to require some complex coding, which way do I go? EDMX or DbContext API?
Is EDMX now old school?
Comments / thoughts?
RuSs