public static void Main(string[] args) { //Serilog日志框架配置 SerilogLogConfig.DoConfig(); var webHost = CreateWebHostBuilder(args).Build(); using (var scope = webHost.Services.CreateScope()) { //数据初始化 DbContextConfig.DbInit(scope); } webHost.Run(); }
public static void Main(string[] args) { //Serilog日志框架配置 SerilogLogConfig.DoConfig(); var webHost = CreateWebHostBuilder(args).Build(); using (var scope = webHost.Services.CreateScope()) { //数据初始化 DbContextConfig.DbInit(scope); } webHost.Run(); }