Entitiy Framework: "Update database from model" instead of "Generate database from model"

I created the Entity Framework 4 model with Visual Studio 2010 and created a database from it. Now I found that I am adding new properties (with default values), changing the documentation for columns, changing column names, changing column types several times. All tasks that do not require a lot of "extra work" so as not to be achieved automatically (in my humble opinion). Each time I did “Generate a database from a model” and, of course, lost the data in the table.

Is there a way to simply upgrade the database architecture to say - leaving the table data intact? Maybe with some user interaction, especially when changing types, etc.? Or is this feature just too complicated for reliable operation?

Thanks in advance! Cheers, David

+5
visual-studio-2010 entity-framework
source share
1 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 have created an entity database power supply to support this. You can download it here: http://visualstudiogallery.msdn.microsoft.com/en-us/df3541c3-d833-4b65-b942-989e7ec74c87

It includes the database creation workflow for a designer who performs the migration, not drop / create.

This message is provided "AS IS" without warranty of any kind and does not give any rights.

I have not tested the tool yet, but I think that information can be meaningful for others as well.

+5
source share

All Articles