title: .NET Core DI, ways of passing parameters to constructor
body: <p>Having the following service constructor</p>
  <pre><code>public class Service : IService
  {
       public Service(IOtherService service1, IAnotherOne service2, string arg)
       {    
       }
  }
  </code></pre>
  <p>What are the choices of passing the parameters using .NET Core IOC mechanism</p>
  <pre><code>services.AddSingleton&lt;IOtherService , OtherService&gt;();
  services.AddSingleton&lt;IAnotherOne , AnotherOne&gt;();
  services.AddSingleton&lt;IService&gt;(x =&gt;
      new Service(
          services.BuildServiceProvider().GetService&lt;IOtherService&gt;(),
          services.BuildServiceProvider().GetService&lt;IAnotherOne &gt;(),
          &quot;&quot;));
  </code></pre>
  <p>Is there any other way ?</p>