public static async Task Main() { while (true) { DailyPriceContext day = new DailyPriceContext(); ApiCall api = new ApiCall(day); var jsonString = await api.GetJson(); await api.UpdateDatabase(jsonString); Thread.Sleep(60000); } }
public ApiCall(DailyPriceContext context) { _context = context; }
public DailyPricesController(DailyPriceContext context, ILogger <DailyPricesController> logger) { // set the database conn string and logger file _context = context; _logger = logger; }