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.
- 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
- Entity Framework Resources
- Entity Framework Terminology
- 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