public IActionResult ASXStocksCached() { DateTime?updatedDate = ASXStockEngine.GetLastCacheUpdateDate(); Task.Run(() => { ASXStockEngine.UpdateCache(); } ); KeyValuePair <string, DateTime?> updatedRecord = new KeyValuePair <string, DateTime?>("Cache last update date", updatedDate); return(new JsonResult(updatedRecord)); }
public IActionResult LastUpdateDate() { DateTime?updatedDate = ASXStockEngine.GetLastCacheUpdateDate(); return(new JsonResult(updatedDate)); }
public IActionResult ASXStocks() { List <ASXListedCompany> stocks = ASXStockEngine.Fetch(); return(new JsonResult(stocks)); }