c# - How can I merge my SQL Server database with MVC auto implemented mdf database -


i wanted enable migrations database, gave me following errors:

more 1 context type found in assembly 'the factory chante'.
enable migrations 'the_factory_chante.models.applicationdbcontext', use enable-migrations -contexttypename the_factory_chante.models.applicationdbcontext.
enable migrations 'the_factory_chante.models.the_factorydbcontext', use enable-migrations -contexttypename the_factory_chante.models.the_factorydbcontext.

i realised have 2 databases in solution , merge the_factory_chante.models.applicaticayiondbcontext auto implemented database mvc existing database.

go tools package manager console in visual studio enter enable-migration enter update database -verbose

if fails

you need specify configuration want use when updating databases.

update-database -configurationtypename myrenamedconfiguration 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -