Database Migrations and Seeding in ASP.NET Core
Posted by: K. Scott Allen,
on 20 Sep 2016 |
View original | Bookmarked: 0 time(s)
There is an instant in time when an ASP.NET application is fully alive and configured but it still held in check and waiting for a signal from the starter’s gun. This moment exists between the lines of code in Program.cs, and it is here where I’ve found a nice place to automatically run database migrations and seed a database based on command line arguments to the program.
public static void Main(string args)
var host = new WebHostBuilder()