Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        public IActionResult LastUpdateDate()
        {
            DateTime?updatedDate = ASXStockEngine.GetLastCacheUpdateDate();

            return(new JsonResult(updatedDate));
        }
Esempio n. 3
0
        public IActionResult ASXStocks()
        {
            List <ASXListedCompany> stocks = ASXStockEngine.Fetch();

            return(new JsonResult(stocks));
        }