Scenario: When I add a validationattribute checksum for a field in an entity model class in models, a model that "supports" xxxdbcontext "context appears on the page after the run has changed since the database was created. Consider using the Code first migration update database "error;
Workaround:
1. In the VS Click Tools->nuget Package Manager, Packages Manager console:
Enter Enable-migrations-force (the last side here has a space)
2. Then follow the prompts to enter:
3, after running in the Code editing window will appear Migrations folder class configuration is open, the automaticmigrationsenabled value is changed to TRUE.
4. The Package Manager console now prompts "No automatic migration is applied because automatic migration results in data loss":
Just run the add-migration Initial command in the console window and enter Update-database to perform the update.
The model that supports the XXXDBCONTEXT context has changed since the database was created. Consider the workaround for using the Code first migration Update database