示例#1
0
        public async Task <ActionResult> Index()
        {
            var dateTimeNow   = DateTime.UtcNow;
            var currencyCodes = ExchangeRateService.GetCurrencyCodes();
            var records       = await ExchangeRateService.GetCurrencyStatsByCode(currencyCodes[0].Code, new DateTime(dateTimeNow.Year, 1, 1), dateTimeNow);

            var model = new ModelCurrencyRate()
            {
                CurrencyCodes = currencyCodes,
                Records       = records
            };

            return(View(model));
        }