Entity Framework 7 - Starting again from scratch05 Oct 2015
There are A LOT of big changes coming to Entity Framework 7. Some small, some large, and some may surprise you!
THIS POST HAS BEEN RETIRED
The .NET platform underwent considerable churn in late 2015, including the renaming of most of the associated technlologies under the "Core" banner, and a lot of the frameworks were heavily refactored resulting in a lot of code & behavior changes.
The content of this post should be considered inaccurate at best.
Microsoft is currently in the midst of modernizing .NET, and working to (FINALLY!) bring .NET to Linux, OSX and elsewehere. As part of this effort, along with the CLR and many parts of the .NET Framework (including EntityFramework) are undergoing some major surgery.
In some cases, signficant amounts of existing code is being re-factored, renamed and moved around into more coherent and relevant modules. In other cases, teams are modifying and, in some cases rewriting, significant portions of their code and tools.
Entity Framework 7 (EF7) is an example of this latter case: In fact, EF7 is largely a complete re-think and rewrite of the venerable ORM. The result? While EF7 shares some conceptual similarities with previous versions, a lot is changing under the covers.
Examples of changes coming in EF7 (which I’ll cover in more detail in subsequent posts) include:
- In EF7, Entity Data Model and EDMX files are gone: EF7 is Code First only!
- EF7 doesn’t support many-to-many relationships transparently!
- EF7 doesn’t support lazy-loading!
- EF7 doesn’t support many of the attributes from EF6 and before!
- EF7 doesn’t currently support data-seeding/data-migration during schema initialization/migration
So big are the changes, in fact, that the EF team originally considered giving EF7 a new name, but chose to stay with the Entity Framework branding (see bottom of this page).
Personally, I wish the EF team would re-consider before launching but I fear we’re past that option.
So how do you learn about these changes? Right now, by writing code targetting EF7 and hitting all the pain points! Official documentation on the changes between EF7 and previous versions is practically non-existent at the moment (the EF team have just created an issue to track this fact), but in the interim, I’ll post details on the issues I trip over them!
I, your stunt coder, aim to make these mistakes so you don’t have to ;)