title: Unable to resolve service for type 'DatabaseConfiguration' while attempting to activate 'MyDbContext'
body: <p>I am having issues using Dependency Injection in ASP.NET MVC Beta 6. In the Startup.ConfigureServices method, I register the class DatabaseConfiguration and MyDbContext. When the project starts, I get the following error: </p>
  
  <pre><code>Unable to resolve service for type 'DatabaseConfiguration' while attempting to activate 'MyDbContext'.
  </code></pre>
  
  <p>I am not sure to understand why this it's not possible to resolve the type DatabaseConfiguration. As far as I can tell, it is properly registered. </p>
  
  <p>What am I missing?</p>
  
  <pre><code>// ASP.NET 5 Beta 6 Project 
  public void ConfigureServices(IServiceCollection services) {
      services.Configure&lt;DatabaseConfiguration&gt;(appSettings =&gt; ConfigurationBinder.Bind(appSettings, this.Configuration.GetConfigurationSection(nameof(DatabaseConfiguration))));
  
      services.AddTransient&lt;MyDbContext&gt;();
  
      services.AddMvc();
  }
  
  public class ValuesController : Controller {
      public ValuesController(MintoDbContext tenantRepo) { // ... }
  
      // ...
  }
  
  // The following classes are in a Class Libary.
  public class MyDbContext : DbContext {
      public MyDbContext(DatabaseConfiguration databaseConfiguration) { // ... }
  }
  
  public class DatabaseConfiguration {
      public string ConnectionString { get; set; }
  }
  </code></pre>