コード例 #1
0
        public CurrencyViewModel GetCurrency(string code)
        {
            var spec = new CurrencyByCodeSpec(code);
            var curr = currRepository.FindOne(spec);

            return(CurrencyViewModel.MapFromData(curr));
        }
コード例 #2
0
        public async Task <IEnumerable <CurrencyViewModel> > GetCurrencies()
        {
            var currencies = await currRepository.GetAll();

            return(currencies.Select(p => CurrencyViewModel.MapFromData(p)));
        }