How to specify constructor when registrating class in asp.net 5 with default Dependecy Injection -


is there possibility instantiate class using asp.net 5 default dependency injection when class have constructor parameters?

i register repository constructor accepts connection_string.

update

i think can rephrase question. specify constructor called when class being registered. similar autofac have. possible?

builder.registertype<configreader>()    .as<iconfigreader>()    .withparameter("configsectionname", "sectionname"); 

unfortunately, out of box di container not support parameter constraints. or nothing.

if want advanced features, can switch di container, autofac, mentioned , supported in asp.net 5.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -