public void ScheduleRatesPoll() { var settings = _options.Value; var rate = _rateReaderService.GetRate(settings.CurrencyRateRequestUrl); _rateRepositoryService.AddRate(rate); }
public Task Execute(IJobExecutionContext context) { return(Task.Run(() => { var settings = _options.Value; var rate = _rateReaderService.GetRate(settings.CurrencyRateRequestUrl); _rateRepositoryService.AddRate(rate); })); }