Code through the pain Ladislav Mrnka's professional blog about software development


Do you remember Entity framework June 2011 CTP with all that nice features? This CTP was initially released as first try for out-of-band (independently on .NET Framework) release of core .NET library - System.Data.Entity.dll. The out-of-band release caused some issues because we had to use separate .NET target for using it and it makes incompatible with other tools and features. Last week ADO.NET team announced that they will not be able to release core functionality out-of-band. It means that all changes and major features / improvements can be released only with a new .NET framework version. The team also announced that we can expect features from June 2011 CTP in upcoming .NET Framework 4.5. What does it mean? .NET Framework 4.5 should contain new version of Core Entity framework libraries (that is the new name for ObjectContext API and Entity framework core features). The rest of this article describes all changes related to upcoming release including new features, missing features and relation to DbContext API.

New features included in Core entity framework libraries should contain:

The bad news is that no more core features will be added in this release. One of cut features is the unique key support which was previewed long time ago and I was so happy to see that. At this time we have to wait for unique keys to .NET 4.5 SP1 or perhaps to .NET 5. Why it was cut? I will leave my opinion for separate posts where I will discuss pros and cons of Data User Voice and the side effect of introducing DbContext API.

Now where is the problem? New features will be fully dependent on .NET Framework 4.5 (and probably also on Visual Studio 11) and .NET Framework 4.5 Developer Preview supports only Windows 7, Windows Server 2008 R2 and upcoming Windows 8. There hasn't been mentioned any official support for Windows XP, Windows 2003, Windows Vista or Windows 2008 yet. Using new Entity framework features in the supported way can require upgrade of .NET Framework and it can also result in upgrading operating system. As you can imagine the bigger company you work for the bigger problem this can be.

First preview of Visual Studio 11 and .NET Framework 4.5 was already provided to developer community but surprisingly this preview doesn't contain any new Entity framework features. These features are even not mentioned in: What is new in ADO.NET 4.5. That is weird because it means that .NET Framewrok 4.5 Developer Preview is missing whole new part of developer API which is publicly available since June. How it could happen? ADO.NET team announced these new features for the second preview but I still wonder why are they omitted from the first one. On the other hand new Entity framework designer supporting multiple diagrams per model and some other enhancements is part of Visual Studio 11.

If you are fan of DbContext API you probably ask: Where are additional features to DbContext API? There are no additional features to DbContext API in .NET Framework 4.5. Actually (as I understand it) .NET Freamwork 4.5 will not include DbContext API at all. DbContext API is just a wrapper around Core Entity framework libraries and it will be still released separately as NuGet package. So if you know that core libraries have something you really want in DbContext API there is still a chance that it will be released out-of-band in the new version of NuGet package.

Btw. since .NET Framework 4.5, Entity Framework will be the official name for DbContext API. IMHO it is wrong idea to change the meaning of the name for existing API because it will make everything more complicated. All of us have to deal with old applications which must be maintained. For applications written in .NET Framework 3.5 SP1 and .NET Framework 4.0 the meaning of Entity framework will always be ObjectContext API but for applications written in .NET Framework 4.5 or later the meaning of ObjectContext API will be Core Entity Framework Libraries and the meaning of Entity Framework will be DbContext API. There will be long period of time where two meanings of the name will clash and from my experience on Stack Overflow and MSDN forums I'm pretty sure it will cause a lot of confusion among developers. Renaming of DbContext API to Entity Framework has also some "hidden meanings" described in the blog post by Julie Lerman.

Anyway Entity Framework will finally have some major changes and now we also know more certainly when these features will be released - they will be released together with .NET Framework 4.5 and Visual Studio 11.

Posted on October 24, 2011 by Ladislav Mrnka
Filed under: Entity framework
Leave a comment
Comments (2) Trackbacks (1)
  1. I’ve looked everywhere for a way to contact you…no contact form, no twitter, no facebook, so I give up and am using the silly method of leaving a comment in an old blog post. :)

  2. Ladislav, you should do a blog post on EF in relation to the mapping scenario described in my question on StackOverflow:

    I am in desperate search of an answer, and no article is there to show how several self-to-self mapping can implemented in one entity class.

    Sorry for an off-topic comment. Thanks in advance!

Leave a comment