//Called on background thread to persist the transaction data public void SaveObjects(IEntitySession session, IList<object> items) { foreach (TransactionLogEntry entry in items) { var entTrans = session.NewLogEntity<ITransactionLog>(entry); entTrans.Duration = entry.Duration; entTrans.RecordCount = entry.RecordCount; entTrans.Changes = entry.Changes; } }
public void SaveObjects(IEntitySession session, IList <object> items) { foreach (TransactionLogEntry entry in items) { var entTrans = session.NewLogEntity <ITransactionLog>(entry); entTrans.Duration = entry.Duration; entTrans.RecordCount = entry.RecordCount; entTrans.Changes = entry.Changes; } }
private void SaveEntries(IEntitySession session, IEnumerable <LogEntry> entries) { var ordered = entries.OrderBy(e => e.CreatedOn).ToList(); if (ordered.Count == 0) { return; } var text = string.Join(Environment.NewLine, ordered); var iLog = session.NewLogEntity <IOperationLog>(ordered[0]); iLog.Message = text; }
private void SaveEntries(IEntitySession session, IEnumerable<LogEntry> entries) { var ordered = entries.OrderBy(e => e.CreatedOn).ToList(); if (ordered.Count == 0) return; var text = string.Join(Environment.NewLine, ordered); if (Saving != null) Saving(this, new LogSaveEventArgs(text)); var iLog = session.NewLogEntity<IOperationLog>(ordered[0]); iLog.Message = text; }
public void SaveObjects(IEntitySession session, IList<object> items) { foreach (SystemLogEntry entry in items) { var iLog = session.NewLogEntity<IOperationLog>(entry); iLog.Message = entry.ToString(); } }