title: How can I create an instance of IConfiguration locally?
body: <p>I'd want to ask how to create an instance of ASP.NET Core's Configuration, the same that's being created when I require it in Controller's constructor which knows about the <code>appsettings.json</code> file</p>
  
  <p>like <code>_config = ActivatorUtilities.CreateInstance&lt;IConfiguration&gt;(null);</code></p>
  
  <blockquote>
    <p>System.InvalidOperationException: 'A suitable constructor for type 'Microsoft.Extensions.Configuration.IConfiguration' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.'</p>
  </blockquote>
  
  <p>It makes sense because it is interface, but how it does work in Controller's Constructor case? and how can I create an instance of that?</p>
  
  <p>I'm using MS DI</p>
  
  <p>Thanks</p>