title: Register abstract class with autofac
body: <p>I just run this code in a quickly made console app with autofac assembly added:</p>
  
  <pre><code>builder.RegisterType&lt;DbConnection&gt;().As&lt;IDbConnection&gt;().WithParameter("connectionString", connectionString);
  </code></pre>
  
  <p>There was no exception although DbConnection is of abstract type.</p>
  
  <p>Does autofac really create a concrete instance of DbConnection although its abstract?</p>
  
  <p>How is that possible not to use:</p>
  
  <p>builder.RegisterType().As().WithParameter("connectionString", connectionString);</p>
  
  <p>Do I have to inherit from DbConnection and inject then MySqlConnection inherited from DbConnection?</p>