public SystemLog LogMessage(EnumSystemLogType logType, string userName, DateTime messageDateTime, string message, string loggerName) { var systemLog = new SystemLog { Id = Guid.NewGuid().ToString(), EnumSystemLogTypeID = logType, UserName = userName, MessageDateTimeUtc = messageDateTime, MessageText = message, LoggerName = loggerName }; this._documentSession.StoreSaveEvict(systemLog); return systemLog; }
public SystemLog LogMessage(EnumSystemLogType logType, string userName, DateTime messageDateTime, string message, string loggerName) { var item = new SystemLog { Id = Guid.NewGuid().ToString(), EnumSystemLogTypeID = logType, UserName = userName, MessageDateTimeUtc = messageDateTime, MessageText = message, LoggerName = loggerName }; using(var db = _sqlConnectionInfo.GetDB()) { db.Insert("SystemLog", "ID", false, item); } return this.GetMessage(item.Id); }