public void Logging(LogDetail log) { if (log != null) { string _detail = JsonConvert.SerializeObject(log); Log _log = new Log() { ID = _logManager.CreateGuid(), DateTime = DateTime.Now, Detail = _detail }; _logManager.Add(_log); _logManager.Save(); } }