I am currently working on a project in which I want to use the Entity Framework for the first time. I read a lot in Lerman / Miller books, on MSDN, on the ADO.NET blog and here on stackoverflow about the latest developments regarding the DbContext API and the first code migrations available with EF 4.3. Since, in particular, the latter are really great, I wondered, can the same thing be done as the "First Model"? Is it possible to do migrations based on the visual designer EDMX (instead of code) after creating code and a database from it?
I found a fairly recent link (2012-04) that says it isn’t (in EF 4.3): Using the EF4 migration tool using the first model approach
Secondly, I found information that the old code tables and databases are overwritten when trying to regenerate them from the EDMX designer?
But the information I'm talking about is about Power Tools: http://blogs.msdn.com/b/adonet/archive/2012/04/09/ef-power-tools-beta-2-available.aspx
Engineer Reverse Code This command allows one-time creation of code mappings of the first code for an existing database. [..] • Running this command will overwrite several previously created files several times, including any changes made to the generated files.
Is this restriction specific only to the code of the power tool engineer-generator, or is it expanding to the EDMX designer as a whole, especially the First Model, too?
Also, in the above article, I found:
View Entity Data Model (read-only) Displays the Code First model in the Entity Framework Designer. • This view of the model is read-only; you cannot update the Code First model using the constructor.
And the same question applies here.
So, is there currently a way with full round-trip without data loss (code and database) and saving the EDMX file that is writable is preferable to the following “First Model”?
From which is supported verson of EF on (already or planned), which version of .NET should I aim then (4.0 is enough?), And it will work with Visual Studio 2010 Professional? Could you give a rough estimate of the date you can implement this?
This, of course, would be amazing and a huge breakthrough! I think that I can only roughly imagine how much work this will be, and I know that you are already fully working at your limit. I want to thank you for your excellent work and encourage you to support it.