Entity Framework: Semi-automatic Migrations
--- --- Entity Framework: Semi-automatic Migrations Your app alerts the user if the database has not being created yet or has changes, then they can create or update from runtime. Works for EF 6 and .NET 4.8. Clone or download the code https://github.com/atorres16/EF-semi-automatic-migrations.git To setup the environment for development, set the connection string in app.config < connectionStrings > < add name = " Db " connectionString = " Data Source=(local)\SQLEXPRESS;Initial Catalog=Dev_TestDB;Integrated Security=True;MultipleActiveResultSets=True " providerName = " System.Data.SqlClient " /> </ connectionStrings > Add an initial migration add-migration init Update the database. This will create a database only for development purposes update-database Run the app and you’ll get: Set a connection string for production Restart the app, you’ll get: Click “Create Database”: Check your databas...