public string MountReport() { foreach (var item in machineService.List()) { time = DateTime.Now - item.CreateDate; if (time.Minutes < limitTime) { OnLineMachine++; } else if (time.Minutes > limitTime && time.Minutes < limitTimeAlert) { AlertMachines++; } else { OffLineMachines++; } } return($"Machines Online {OnLineMachine} and Alert Machines {AlertMachines} and OffLine Machines {OffLineMachines}"); }