public static void AddSupportSessionLog(SupportSessionLog log) { lock (supportSessionLogLock) { supportSessionLogs.Add(log); } }
public SupportSessionLog Add(SupportSessionLog supportSessionLog, int callerId) { using (UBContext ubc = new UBContext()) { try { ubc.Add(supportSessionLog); ubc.SaveChanges(); return(supportSessionLog); } catch (Exception ex) { if (ex.InnerException != null) { Utils.Logging.AddLog(new SystemLog() { LoggerName = "Unifiedban.Data", Date = DateTime.Now, Function = "Unifiedban.Data.SupportSessionLogService.Add", Level = SystemLog.Levels.Warn, Message = ex.InnerException.Message, UserId = callerId }); } } return(null); } }