示例#1
0
        public IActionResult Gify(GifyDates gifyDates)
        {
            RateViewModel rateViewModel = new RateViewModel();

            var firstValue  = _ratesService.GetRateByDate(DateTime.Parse(gifyDates.FistDate), "RUB");
            var secondValue = _ratesService.GetRateByDate(DateTime.Parse(gifyDates.SecondDate), "RUB");

            if (secondValue > firstValue)
            {
                rateViewModel.IsBigger = true;
                rateViewModel.Url      = _gifsService.GetGifs("l1AsxS5F4Au3gelck");
            }
            else
            {
                rateViewModel.IsBigger = false;
                rateViewModel.Url      = _gifsService.GetGifs("7x90dc0KEjRNC");
            }

            return(View(rateViewModel));
        }