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

            return(View(model));
        }