public ActionResult <string> GetStockInfo() { //write a function to fetch dbcontext, and pass it the formatted info to update the database with string[] tickers = { "MSFT", "TSLA", "AAPL", "BABA" }; var list = AlphaVantageStock.FormatInfo(tickers, _apiKey.AlphaVantageKey); _context.AddRange(list); _context.SaveChanges(); return(list.ToString()); }
public ActionResult <string> GetStockInfo(string symbol) { return(AlphaVantageStock.FetchStock(symbol, _apiKey.AlphaVantageKey)); }