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

Posted by David on Stack Overflow See other posts from Stack Overflow or by David
Published on 2010-06-16T13:39:58Z Indexed on 2010/06/16 13:42 UTC
Read the original article Hit count: 431

Hey everyone,

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

© Stack Overflow or respective owner

Related posts about entity-framework

Related posts about visual-studio-2010