示例#1
0
 public IActionResult GetHistory(string symbol)
 {
     try
     {
         var result = stockMarket.GetStockHistory(symbol, 400);
         return(Ok(result));
     }
     catch (Exception ex)
     {
         Logger.WriteLine($"WEBAPI GetHistory({symbol}) failed with exception. Message {ex.Message}");
         return(NotFound("Exception in GetHistory() function"));
     }
 }