I am using MVC 5 and EF 6 with Code First. I got this error every time I tried to log in:
The model backing the 'ApplicationDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).
This program is ok for 2 years in development until this strange error come this week. Normally after we change the model, we just simply update-database and everything ok. Today we try to do the same and no error returned :
PM> update-database Specify the '-Verbose' flag to view the SQL statements being applied to the target database. No pending explicit migrations. Applying automatic migration: 202012212240459_AutomaticMigration. Running Seed method. PM>
We are using automated migration. But i just try to add migration manually and update-database again successfully but still returning same error.
We tried to remove the database and recreate again using update-database and a new database created, create a dummy account but still returning the same error. Tried following and checking some suggestions in other threads and still not get a good result. Deleting migration history solved the error but when we update-database for future update it will create a duplicate error, so this is not counted as a solution. I don't know what to debug anymore and what to check. Any help is appreciated. Thank you.