public CurrencyViewModel GetCurrency(string code) { var spec = new CurrencyByCodeSpec(code); var curr = currRepository.FindOne(spec); return(CurrencyViewModel.MapFromData(curr)); }
public async Task <IEnumerable <CurrencyViewModel> > GetCurrencies() { var currencies = await currRepository.GetAll(); return(currencies.Select(p => CurrencyViewModel.MapFromData(p))); }