title: IOptions Injection
body: <p>It seems to me that it's a bad idea to have a domain service require an instance of <code>IOptions&lt;T&gt;</code> to pass it configuration.   Now I've got to pull additional (unnecessary?) dependencies into the library.  I've seen lots of examples of injecting <code>IOptions</code> all over the web, but I fail to see the added benefit of it.</p>
  <p>Why not just inject that actual POCO into the service?</p>
  <pre><code>    services.AddTransient&lt;IConnectionResolver&gt;(x =&gt;
      {
          var appSettings = x.GetService&lt;IOptions&lt;AppSettings&gt;&gt;();
  
          return new ConnectionResolver(appSettings.Value);
      });
  </code></pre>
  <p>Or even use this mechanism:</p>
  <pre><code>        AppSettings appSettings = new AppSettings();
  
          Configuration.GetSection(&quot;AppSettings&quot;).Bind(appSettings);
  
          services.AddTransient&lt;IConnectionResolver&gt;(x =&gt;
          {      
               return new ConnectionResolver(appSettings.SomeValue);
          });
  </code></pre>
  <p>Usage of the settings:</p>
  <pre><code>public class MyConnectionResolver 
  {
       // Why this?
       public MyConnectionResolver(IOptions&lt;AppSettings&gt; appSettings)
       {
             ... 
       }
  
       // Why not this?
       public MyConnectionResolver(AppSettings appSettings)
       {
             ... 
       }
       
       // Or this
       public MyConnectionResolver(IAppSettings appSettings)
       {
             ... 
       }
  }
  </code></pre>
  <p>Why the additional dependencies?  What does <code>IOptions</code> buy me instead of the old school way of injecting stuff?</p>