Esempio n. 1
0
 public SqlCurrencyRepository(
     IConetextFactory <DbCurrencyContext> conetextFactory,
     ICurrecyFactory currecyFactory)
 {
     _conetextFactory = conetextFactory;
     _currecyFactory  = currecyFactory;
 }
Esempio n. 2
0
        private static async Task Load(ICurrencyRepository curencyRepository,
                                       ICurrecyFactory currecyFactory,
                                       IEnumerable <CnbCurrencyHistory> recordsToHandle)
        {
            var currecies = recordsToHandle
                            .Select(e => currecyFactory.Create(e.Code, e.Amount, e.Rate, e.Date))
                            .ToArray();

            await curencyRepository.SaveAsync(currecies);
        }
Esempio n. 3
0
 public RateReaderService(
     ICurrencyRepository currencyRepository,
     ICurrencyDataProvier currencyDataProvier,
     ICurrecyFactory currecyFactory,
     RateReaderServiceConfiguration configuration,
     ILogger <RateReaderService> logger)
 {
     _currencyRepository  = currencyRepository;
     _currencyDataProvier = currencyDataProvier;
     _currecyFactory      = currecyFactory;
     _configuration       = configuration;
     _logger = logger;
 }