public ActionResult <List <Stock> > Get() { try { var results = _stockData.GetAllStocks(); return(Ok(results)); } catch (Exception) { return(this.StatusCode(StatusCodes.Status500InternalServerError)); } }
public IActionResult Index() { var model = _stockData.GetAllStocks(); return(View(model)); }