EF 5 - The first model, how to update the database schema without resetting the database

I am developing in MVC 4, EF 5.0

Model First development - how can I easily get the database schema for updating without dropping the database / erasing any data?

eg. I have a Customer table. In this table, we record the first name, last name, email address. Now I want to get a phone number, so I change the model and get EF to update the database schema.

Visual studio 2012 refers to http://go.microsoft.com/fwlink/?LinkId=238269 , however for me it looks like Chinese.

They talk about launching the NUGET package, called the first code transfer. This feature does not ship automatically with VS2012?

thanks

+6
source share
1 answer

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

+3
source

Source: https://habr.com/ru/post/926695/


All Articles