Esempio n. 1
0
        private async Task <Currency> GetOrCreateCurrencyAsync(string currencyName)
        {
            var currency = _storageBroker.SelectAllCurrencies()
                           .FirstOrDefault(currency => currency.Name.ToLower().Equals(currencyName.ToLower())) ??
                           await AddCurrencyAsync(currencyName);

            return(currency);
        }