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