Exemple #1
0
 public static int Main(string[] args) => Host.CreateDefaultBuilder(args)
 .UseServiceProviderFactory(new AutofacServiceProviderFactory())
 .ConfigureWebHostDefaults(webBuilder =>
 {
     webBuilder.UseStartup <Startup>();
 }).UseSerilog().Build()
 .MigrateDbContext <UserDbContext>((_, __) => { DataSeeder.UserDbSeeder(_); })
 .MigrateDbContext <PostDbContext>((_, __) => { DataSeeder.PostDbSeeder(_); })
 .RunWebHost();