EF 5 - Model First, How to update DB Schema without dropping database

asp.net-mvc entity-framework

Question

I am developing in MVC 4, EF 5.0

Model First development - how do I 'easily' get the DB schema to update, without having to drop the database / erase any data?

e.g. I have a Customer table. In this table, we capture name, surname, email address. I now want to collect the telephone number, so I change the model and get EF to update the database schema.

Visual studio 2012 referrs me to http://go.microsoft.com/fwlink/?LinkId=238269, however this looks like chinese to me.

They talk about running an NUGET package called code first migrations. Does this functionality not come packaged automatically with VS2012?

Thanks

1
6
10/1/2012 6:54:41 PM

Popular Answer

Database migrations is what you are looking for. Both automatic and specified in code - http://msdn.microsoft.com/pl-PL/data/jj591621

3
10/1/2012 6:58:00 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