I have a class with a constructor that looks like the following:
public BatchService(IRepository repository, ILogger logger, string user)
I
First of all it's not good idea mix ILogger
with business logic. You can create ILogger directly in BatchService
or resolve thru [Dependency]
attribute. DI it's not panacea, business object creation shouldn't depend from ILogger
Use new InjectionParameter
Take a look please Registering Injected Parameter and Property Values for more details