0

I wanted to enable migrations for my database, then it gave me the following errors:

More than one context type was found in the assembly 'The Factory Chante'.
To enable migrations for 'The_Factory_Chante.Models.ApplicationDbContext', use Enable-Migrations -ContextTypeName The_Factory_Chante.Models.ApplicationDbContext.
To enable migrations for 'The_Factory_Chante.Models.The_FactoryDBContext', use Enable-Migrations -ContextTypeName The_Factory_Chante.Models.The_FactoryDBContext.

I then quickly realised that I have two databases in my solution and I would like merge the The_Factory_Chante.Models.ApplicaticayionDBContext auto implemented database by MVC with my already existing database.

ekad
  • 14,436
  • 26
  • 44
  • 46

1 Answers1

0

go to tools package manager console in Visual studio enter Enable-Migration then enter Update Database -Verbose

if it fails

You will then need to specify which configuration you want to use when updating the databases.

Update-Database -ConfigurationTypeName MyRenamedConfiguration
MMM
  • 3,132
  • 3
  • 20
  • 32
  • Does this merge the databases? I do want to have only one database. –  Jun 14 '15 at 16:27
  • http://stackoverflow.com/questions/19764233/merge-mydbcontext-with-identitydbcontext see this link @user3466153 – MMM Jun 14 '15 at 16:33