Convention based binding of constructor string arguments with Ninject
问题 I'm using Ninject as IoC container in my project. I have following class: public class SomeRepository:ISomeRepository { public SomeRepository(string someDatabaseConnectionString) { // some code here.. } } In my application settings file I have connection string named "someDatabase". By default the one should add following configuration in order to inject this connection string into the constructor: kernel.Bind<ISomeRepository>() .To<SomeRepository>() .WithConstructorArgument(