private IList <ICurrencyRate> GetTodayCurrencyList()
        {
            var CurrencyList =
                _currencyApi.GetCurrenciesFromApi(DateTime.Now.AddDays(-1), DateTime.Now).Select(x => x.Value).FirstOrDefault();

            return(CurrencyList);
        }
Esempio n. 2
0
        public IActionResult Currency(DateTime dateFrom, DateTime dateTo)
        {
            if (dateFrom == DateTime.Parse("01.01.0001 00:00:00") || dateTo == DateTime.Parse("01.01.0001 00:00:00"))
            {
                dateFrom = DateTime.Now.AddDays(-1);
                dateTo   = DateTime.Now;
            }

            var CurrencyList =
                _currencyApi.GetCurrenciesFromApi(dateFrom, dateTo);

            return(View(CurrencyList));
        }