title: .NET Core 2 & DI - use values from appsettings.json in the constructor?
body: <p>how to use the constructor parameters, whose values are stored in the <code>appsettings.json</code> ?</p>
  
  <pre><code>services.AddTransient&lt;IService, Service&gt;(x =&gt; new Service("arg1", "arg2"));
  </code></pre>
  
  <p>I use the <code>IOptions</code> interface to read my config values</p>
  
  <pre><code>services.Configure&lt;MyOptions&gt;(Configuration.GetSection(nameof(MyOptions)));
  </code></pre>