private static void AddDataDailyToContext(AdvisorEntities ctx, Ticker ticker, List<QuandlStockResponse> data) { foreach (var el in data) { ctx.TickerDailyData.Add(new TickerDailyData() { Close = el.Close, High = el.High, Low = el.Low, Open = el.Open, Point = el.Date, Ticker = ticker, Volume = el.Volume }); } }
private static void ProceedWithWeeklyData(AdvisorEntities ctx, Ticker ticker, string[] code, Ticker innerTicker, DateTime startDate) { List<QuandlStockResponse> data = QuandlHelper.GetData(code[0], code[1], startDate, Frequencies.Weekly); AddDataWeeklyToContext(ctx, ticker, data); innerTicker.LastWeeklyUpdate = DateTime.Now; }