public async Task <int> Handle(AddOrUpdateCurrencyCommand command) { command.Currency.Code.ThrowIfNullOrEmpty("Invalid currency code parameter", nameof(command.Currency.Code)); command.Currency.Name.ThrowIfNullOrEmpty("Invalid currency name parameter", nameof(command.Currency.Name)); command.UserId.ThrowIfNotPositiveNonZeroInt("Invalid user id parameter", nameof(command.UserId)); return(await _currencyRepository.AddOrUpdateCurrencyAsync(command.Currency, command.UserId).ConfigureAwait(false)); }