public IActionResult Index() { var item = new TimeList(); item.Refresh(); return(View(item)); }
public RealTime Index() { var result = new RealTime(); try { bool enableSearch = Configuration.GetValue <bool>("ApiFlag:EnableSearch"); if (!enableSearch) { result.Succeed = false; result.ErrorMsg = "Currently the system is set off."; return(result); } var item = new TimeList(); item.Refresh(); result.TimeList = item; result.Succeed = true; } catch (Exception ex) { result.ErrorMsg = ex.Message + " - " + ex.InnerException; } return(result); }