private void SaveInDb(
            string machineName,
            ulong memoryAvailable,
            ulong memoryTotal,
            double cpuPercent)
        {
            var model = new SystemStabilityLogg()
            {
                MachineName            = machineName,
                MemoryAvailable        = memoryAvailable.ToString("#.##"),
                MemoryTotal            = memoryTotal.ToString("#.##"),
                CpuPercent             = cpuPercent.ToString("#"),
                MemoryAvailablePercent = (((decimal)memoryAvailable / (decimal)memoryTotal) * 100m).ToString("#"),
                DateCreated            = DateTime.Now
            };

            systemStabilityLoggsService.Add(model);
        }
 public void Add(SystemStabilityLogg systemStabilityLogg)
 {
     systemStabilityLoggRepo.Add(systemStabilityLogg);
     systemStabilityLoggRepo.SaveChanges();
 }