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

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 -