Data Driver

Blog archive

Entity Framework 4.3 Gets Final Tune-Up -- Enum Support Promised in 5.0

Microsoft last week shipped the Entity Framework 4.3 Beta 1, with some NuGet integration enhancements and bug fixes in preparation for the final go-live release, expected in the next couple of months.

"We are planning for this to be the last pre-release version of migrations and our next release will be the final RTM of EF 4.3," said a post on the ADO.NET team blog. It said the team is "still on-track to get a full supported, go-live, release of EF 4.3 published this quarter (first quarter of 2012)."

EF 4.3 Beta 1 includes some Code First migration work done last November in a separate beta, now integrated into the EF NuGet package. The Code First Migrations enhancements include new commands, command-line tools, XML documentation, improved logging and more.

The new beta also fixes some bugs in the DbContext API and Code First.

Another piece of good news for database developers was the reminder of upcoming--and long sought-after--enum support: "EF 5.0 (Enum support is coming... finally!)" Along with enums, the 5.0 release will include spatial data types and performance improvements. "As soon as the next preview of the .NET Framework 4.5 is available we will be shipping EF 5.0 Beta 1, which will include all these new features," the blog said.

But some readers were concerned with more than technical nuts and bolts. The disparate versioning system resulting from the separation of Entity Framework and .NET Framework releases led to several comments, such as:

"Oh? EF 5.0 in .NET 4.5? You renamed EF 2.0 to 4.0 to match .NET version, now you are jumping ahead without reasons? Why not keep EF and .NET versions synced? So .NET 4.5 has C# 5.0 and EF 5.0, that's a mess."

Another wrote:

"EF 5.0 is comming. What does it mean? In one of your previous articles you mentioned that EF in .NET 4.5 will be renamed to EF Core libraries and DbContext API will be renamed to EF. So what is EF 5.0? Is it DbContext API supporting new features from EF Core libraries included in .NET 4.5? Or is it EF Core libraries."

Microsoft's Diego B. Vega addressed the issue in his own comment:

"EF 5 will ship as a new version of the EntityFramework NuGet package at the same time NET 4.5 and VS 11 ship.

We are not really trying to differentiate EF from .NET. We are simply trying to evolve EF at a different pace. Indeed, we have decided to version EF separately from .NET and to follow semantic versioning rules strictly."

Vega went on to discuss the issue in more detail, and the entire EF versioning issue is explained in this blog post, if you're curious.

The ADO.NET team also posted some EF 4.3 hands-on tips and guidance in a Code-Based Migrations Walkthrough, an Automatic Migrations Walkthrough and a post on EF 4.3 Configuration File Settings.

How do you database developers like the new EF enhancements such as Code First and the DbContext API? Or do those mere technicalities pale in comparison to the odd versioning structure? Comment here or drop me a line.

Posted by David Ramel on 01/19/2012 at 1:15 PM

comments powered by Disqus

Reader Comments:

Wed, Apr 25, 2012 huanguo China

I want to use the Entity Framework 5.0

Wed, Jan 25, 2012 Dave U.S

People should check out devarts LinqConnect. Comparing LinqConnects designer with EF designer you will see how lousy the EF designer is.

Wed, Jan 25, 2012 Dave U.S

The designer is buggy. When updating from the database the mappings get screwed up if a field becomes nullable. The edmx file gets screwed up all the time when you have a large amount of tables. The designer doesn't support schemas properly. There are many other bugs with the designer. The performance of EF when doing queries with the database is abysmal. The sql it generates looks like something done by a 3rd grader. Enums should have been supported a long time ago. I also don't care at all about code first....but it seems like alot of other people do. I don't like how slow the progress of adding / bug fixes are going with EF.

Tue, Jan 24, 2012 Ryan Haney

+1 for DbContext & Code First! What I would like to see, though, is support for Query Interception. I have business rules that currently force me to wrap DbSets and intercept on execute. For example, if you have Orders with OrderDetails, how can you return a list of filtered OrderDetails while accounting for deep Includes? I would like to see a generic query intercept API that accepts a single type parameter and a Func. Then I could write something like builder.Intercept(od => od.SalesRepId == UserId); Whenever OrderDetails are being queried, EF would ensure my filter is applied. I could see additional overloads applied.

Add Your Comments Now:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Please type the letters/numbers you see above

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.