Entitiy Framework: "Update Database from Model" instead of "Generate Database from Model"

entity-framework visual-studio-2010

Question

I have created a Entity Framework 4 model with Visual Studio 2010 and generated a database from it. Now I found myself adding new properties (with default values), changing documentation of columns, changing names of columns, changing types of columns several times. All tasks that do not require much "extra work" in order not to be possible to be achieved automatically (in my humble opinion). Everytime I did "Generate Database from Model" and lost of course the table data.

Is there a way just to update the database's architecture so to say - leaving the table data untouched? Maybe with some user interaction especially when changing types etc.? Or would this functionality be simply too difficult to be realized to work in a reliable way?

Thanks in advance! Cheers, David

1
5
6/16/2010 1:39:58 PM

Accepted Answer

Noam Ben-Ami - MSFT1 (Microsoft Employee) answered my question at http://social.msdn.microsoft.com/Forums/en-us/adodotnetentityframework/thread/3adc080f-ee8c-4104-be29-95b2fb3fabe9 as follows:

We've build the entity designer database power pack to support this. You can download it here: http://visualstudiogallery.msdn.microsoft.com/en-us/df3541c3-d833-4b65-b942-989e7ec74c87

It includes a database generation workflow for the designer that does migration, rather than drop/create.

This posting is provided "AS IS" with no warranties, and confers no rights.

I haven't tested the tool yet, but I guess the info might be valueable for others, too.

5
6/22/2010 5:09:20 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow