One framework to rule us all…
.NET Framework 4.0, Entity Framework

Entity Framework 4.1: Resources and What’s New

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

Other Resources

Have fun.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

1 Comment

  1. 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?


Leave a Reply