The simplest implementation of Mediator pattern in .NET core.
Define domain command objects by inheriting from Command class (DomainDispatching.Commanding.Command).
Define a handler class for each command to handle commands by inheriting from ICommandHandler interface.
builder.RegisterType<CreateOrderCommandHandler>().As<ICommandHandler<CreateOrderCommand>>();
services.AddSingleton<DomainDispatcher>();