title: Passing configuration to Ninject
body: <p>I need to pass an IConfiguration to my DbClient class and my repositories depend on this DbClient. I couldn't get this to work.</p>
  
  <p>My DbClient:</p>
  
  <pre><code>public class DbClient
  {
     public DbClient(IConfiguration config)
     {
        // Perform some initialization
     }
  }
  </code></pre>
  
  <p>My repository depends on the DbClient:</p>
  
  <pre><code>public class MyRepository : IMyRepository
  {
     private DbClient _client;
     public MyRepository(DbClient client)
     {
        _client = client;
     }
  }
  </code></pre>
  
  <p>My Bindings class</p>
  
  <pre><code>public class NinjectBindings : NinjectModule
  {
     public override void Load()
     {
        Bind&lt;DbClient&gt;().To&lt;DbClient&gt;(); // ?? Not sure about this
        Bind&lt;IMyRepository&gt;().To&lt;MyRepository&gt;();
     }
  }
  </code></pre>
  
  <p>And the Main in my console app:</p>
  
  <pre><code>static void Main()
  {
     var config = new Configuration();
     config.AddJsonFile("settings.json");
  
     var kernel = new StandardKernel();
     kernel.Load(Assembly.GetExecutingAssembly());
  
     var myRepository = kernel.Get&lt;IMyRepository&gt;();
  }
  </code></pre>
  
  <p>What am I missing? What do I need to do to pass IConfiguration into the DbClient  and make sure the repository initializes properly?</p>