entity framework - Migrations over an existing database? -


i have been using code-first approach existing database mapping tables in dbcontext file , forth.

everything works great, i'd able migration on top of existing database structure without using automatically generated migration code create database scratch or setting automaticmigrationenabled = true

right getting error acceptable initial migration file not include existing structure:

unable update database match current model because there pending changes , automatic migration disabled. either write pending model changes code-based migration or enable automatic migration. set dbmigrationsconfiguration.automaticmigrationsenabled true enable automatic migration.  can use add-migration command write pending model changes code-based migration. 

what need run migration?

i found tip on youtube fabio scopel code first migrations - how update database schema.

http://www.youtube.com/watch?v=i7sdd5jcjn4


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -