protected async Task DispatcheAsync <T>(T command) where T : ICommand { if (command is IAuthenticatedCommand authenticatedcommand) { authenticatedcommand.UserId = UserId; } await CommandDispatcher.DispatcheAsync(command); }