public static void Main(string[] args) { var host = BuildWebHost(args); using (var newScope = host.Services.CreateScope()) { Console.WriteLine("Seeding Database"); var context = newScope.ServiceProvider.GetRequiredService <AppDbContext>(); DbInit.SeedFakeData(context); } host.Run(); }