I have registered my types using
Scan(
scan => {
scan.TheCallingAssembly();
scan.WithDefaultConventions();
scan.With(new ControllerConvention());
});
But how do I specify for constructor injection with out having to specify the concrete type like this?
string connStr = "...";
For<IRepository().Use<MyRepository>().Ctor<string>("connectionString").Is(connStr);
You can create dedicated convention for registration of repositories.
or create dedicated type to provide with connection string. I bet you are getting it from web/app.config so adding abstraction for accessing it would be helpful anyway.
Then you just add it as a dependency for your MyRepository and you don't need to add it explicitly in registration or use custom convention.
You can consider creating an abstract base repository class to be inherited by each repository to get rid of setup bolerplate.
Hope this helps!