I'm using Ninject for dependency injection in my ASP.NET MVC project. I've lot of repository classes and each class take the connection string parameter in the constructor.
Currently for each mapping I've to pass the connection string as well.
Ex.
Bind<INewsRepository>().To<NewsRepository>().WithConstructorArgument("connectionString", "Data Source=...");
Bind<IProductsRepository>().To<ProductsRepository>().WithConstructorArgument("connectionString", "Data Source=...");
Is it possible to bind the "connectionString" directly to the configuration value at a global level instead of specifying at each binding?