Autofac resolve dependency in CQRS CommandDispatcher
I'm trying to implement a simple CQRS-application example. This is a structure of my "Command" part: public interface ICommand { } //base interface for command handlers interface ICommandHandler<in TCommand> where TCommand: ICommand { void Execute(TCommand command); } // example of the command public class SimpleCommand: ICommand { //some properties } // example of the SimpleCommand command handler public class SimpleCommandHandler: ICommandHandler<SimpleCommand> { public void Execute(SimpleCommand command) { //some logic } } This is interface ICommandDipatcher . It dispatches a command to its