I\'m using Autofac. I want to inject a different implementation of a dependency based on an attribute I apply to the constructor parameter. For example:
clas
Bryan's answer is good enough while you have several repositories and they have few constructor parameters. But it is difficult to set up your root when you have many of them. You can achieve this by scanning your class metadata on resolving an interface. When you get info about its parameters you can resolve actual implementation of it. See my answer here.