Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 public ApiCall(DailyPriceContext context)
 {
     _context = context;
 }
Exemplo n.º 3
0
 public DailyPricesController(DailyPriceContext context, ILogger <DailyPricesController> logger)
 {
     // set the database conn string and logger file
     _context = context;
     _logger  = logger;
 }