title: Value cannot be null (Parameter 'connectionString') .NET 6
body: <p>I use .Net 6 and when I want to run my first migration, I get this error:</p>
  <blockquote>
  <p>Value cannot be null. (Parameter 'connectionString')</p>
  </blockquote>
  <p>My <code>appsettings.json</code>:</p>
  <pre><code>{
    &quot;ConnectionStrings&quot;: {
      &quot;DefaultConnection&quot;: &quot;Server=(localdb)\\mssqllocaldb;Database=Solardb;integrated security=SSPI&quot;
    },
    &quot;Logging&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>And this is my <code>Configuration</code> method in <code>program.cs</code>:</p>
  <pre><code>builder.Services.AddDbContext&lt;SolarDbContext&gt;(options =&gt;
      options.UseSqlServer(builder.Configuration.GetConnectionString(&quot;ConnectionStrings&quot;)));
  </code></pre>