title: Configuration.GetConnectionString returns null
body: <p>I'm trying to get a handle on how the Configuration manager is accessed throughout an demo project I'm working on. I deliberately NOT using Entity Framework Core, so I'm doing things more by hand, which means I need to access the configuration settings more explicitly than simply using the builder in the program file.</p>
  <p>When I try and retrieve the connection string, it returns null.</p>
  <p>Here is where I'm trying to prove out that I can see my connection string so that I can use it in my repositories eventually:</p>
  <pre><code>private readonly ILogger&lt;WeatherForecastController&gt; _logger;
  private readonly IConfiguration _configuration;
  
  public WeatherForecastController(ILogger&lt;WeatherForecastController&gt; logger, IConfiguration configuration)
  {
      _logger = logger;
      var builder = new ConfigurationBuilder();
      _configuration = configuration;
  }
  
  [HttpGet(&quot;getConfig&quot;)]
  public string GetConfig() 
  {
      var connString = _configuration.GetConnectionString(&quot;DefaultConnection&quot;);
      return connString;
  }
  </code></pre>
  <p>And here is my <code>appsettings.json</code> file:</p>
  <pre><code>{
    &quot;Logging&quot;: {
      &quot;ConnectionStrings&quot;: {
        &quot;DefaultConnection&quot;: &quot;Server=localhost\\SQLEXPRESS; Database=library-mgmt-system; Trusted_Connection=true;&quot;
      },
      &quot;LogLevel&quot;: {
        &quot;Default&quot;: &quot;Information&quot;,
        &quot;Microsoft.AspNetCore&quot;: &quot;Warning&quot;
      }
    },
    &quot;AllowedHosts&quot;: &quot;*&quot;
  }
  </code></pre>
  <p>When I call this method, it returns null. I'm using .NET Core 6.</p>