public async Task Dispatch(Command command)
{
CommandHandler handler;
if(_handlers.TryGetValue(command.GetType(), out handler))
{
await handler.Handle(command);
}
else
{
throw new NotImplementedException($"No handler for commandtype {command.GetType().FullName}");
}
}