/// <summary> /// Get all currency /// </summary> /// <returns>List of interfaces</returns> public async Task <IEnumerable <ISPCurrencyRate> > GetAllCurrencyRate() { var currencyRateList = await currencyRateDataService.GetAllCurrencyRate(); var currencyList = await currencyDataService.GetAllCurrency(); List <ISPCurrencyRate> newCurrencyRateList = new List <ISPCurrencyRate>(); foreach (var currencyRate in currencyRateList) { var currencyName = currencyRateList .Where(x => x.Id == currencyRate.Id) .Join( currencyList, u => u.CurrencyId, r => r.Id, (u, r) => new { Currency = r.Currency }) .Select(x => x.Currency).ToList(); currencyRate.CurrencyList = currencyName; newCurrencyRateList.Add(currencyRate); } return(newCurrencyRateList); }
/// <summary> /// Gets all currency. /// </summary> /// <returns> /// List of interface /// </returns> public async Task <IEnumerable <ISPCurrency> > GetAllCurrency() { var currencyList = await currencyDataService.GetAllCurrency(); return(currencyList); }