Пример #1
0
        public IHttpActionResult GetRates()
        {
            logger.Debug(Resources.ResourcesLog.EnterFunction + System.Reflection.MethodBase.GetCurrentMethod().Name);

            try
            {
                var data = this.dataRatesBl.GetDataRates();
                setRedis.AddRates(data.Result, Resources.ResourcesLog.keyRates);
                return(Ok(data));
            }
            catch (Exception)
            {
                logger.Debug(Resources.ResourcesLog.FailConnect + System.Reflection.MethodBase.GetCurrentMethod().Name);
                return(Ok(getRedis.GetRates(Resources.ResourcesLog.keyRates)));
            }
        }
 public List <DataRates> SetDataRates(List <DataRates> dataRates, string key)
 {
     logger.Debug(System.Reflection.MethodBase.GetCurrentMethod().Name);
     return(setDataRates.AddRates(dataRates, key));
 }