c# - How to automatically update the database on application start up? -
a run time error occurs when run code asking me code migration update database. not sure how this, can me?
the model backing 'applicationdbcontext' context has changed since database created. consider using code first migrations update database
you must enable automatic migrations in context configuration file
internal class configuration : dbmigrationsconfiguration<yourcontext> { public configuration() { this.automaticmigrationsenabled = true; this.automaticmigrationdatalossallowed = false; }
Comments
Post a Comment