Tuesday, April 14, 2020

Don't wrap nested stuff to yank from appsettings.json in a not null safeguard like this.

IConfiguration configuration = new ConfigurationBuilder().AddJsonFile(
      "appsettings.json", optional: true, reloadOnChange: true).Build();
if (configuration["loggingConfiguration"] != null)
{

No comments:

Post a Comment