<pre>public class Program { public static void Main(string[] args) { CreateHostBuilder(args).Build().Run(); } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); }) .UseSerilog((hostingContext, loggerConfiguration) => { var connectionString = hostingContext.Configuration.GetSection("Serilog:WriteTo:0:Args:connectionString"); connectionString.Value = connectionString.Value; loggerConfiguration.ReadFrom.Configuration(hostingContext.Configuration); }); }
ConfigureWebHostDefaults
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)