Last week the data team shipped the Release Candidate of Entity Framework 4.1. You can learn more about it and download it here.
EF 4.1 includes the new “EF Code First” option that I’ve blogged about several times in the past. EF Code First provides a really elegant and clean way to work with data, and enables you to do so without requiring a designer or XML mapping file. Below are links to some tutorials I’ve written in the past about it:
- Code First Development with Entity Framework 4.x
- EF Code First: Custom Database Schema Mapping
- Using EF Code First with an Existing Database
The above tutorials were written against the CTP4 release of EF Code First (and so some APIs might be a little different) – but the concepts and scenarios outlined in them are the same as with the RC.
Go Live License
Last week’s EF 4.1 RC ships with a “go live” license that enables you to use it in production environments. The final release of EF 4.1 will ship within the next 4 weeks and will be 100% API compatible with the RC release.
Improvements with the RC
The RC includes several improvements and enhancements. The EF team has a good blog post summarizing the RC changes. Scott Hanselman also has a nice video interview with the data team that talks more about the release.
One of my favorite improvements introduced with last week’s RC is its support for medium trust security. This enables you to use EF 4.1 (and code-first) within low-cost ASP.NET shared hosting web environments – without requiring a hoster to install anything to use it.
EF 4.1 also now supports validation with not only code-first scenarios, but also model-first and database-first workflows.
Upgrading from previous releases
The RC does include a few API tweaks and changes from the prior CTP builds. Read the release notes that come with the release to get a more detailed listing of the changes.
John Papa also has an excellent Upgrading to EF 4.1 RC blog post that describes the steps he took when upgrading a large project he wrote with the previous CTP5 release. The work to upgrade is pretty straight forward and easy – use his write-up as a guide on how to quickly update projects of your own.
NuGet Package Rename
One of the changes that the data team made between the CTP5 and RC releases was to rename the NuGet package name from “EFCodeFirst” to “EntityFramework”. They decided to make this change since the EF 4.1 release now includes several additions above and beyond just code first.
If you already have installed the “EFCodeFirst” NuGet package, you’ll want to uninstall it and then install the new “EntityFramework” NuGet package. John Papa’s blog post details the exact steps on how to do this (it only takes ~20 seconds to do this).
More EF Tutorials
Julie Lerman has created some nice whitepapers and tutorials for MSDN that show using the new EF4 and EF 4.1 feature set.
Click here to find links to read and watch them.
I’m really excited about the EF 4.1 release that will be shipping next month. It significantly improves the Entity Framework, and makes it even easier and cleaner to work with data inside of .NET.
You can take advantage of it within all ASP.NET projects (including both Web Forms and MVC), within client projects using Windows Forms and WPF, and within other project types like WCF, Console and Services. You can use NuGet to easily install it within all of them.
Hope this helps,
P.S. I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu