public async Task AddUserLoginEvent(UserLoginEvent userLoginEvent) { _context.AddAuditCustomField(CustomFields.AppUser, userLoginEvent.Username); await _context.UserLoginEvent.AddAsync(userLoginEvent); await _context.SaveChangesAsync(); }
public async Task CloseAlertRangeAsync(IEnumerable <Alert> alerts) { foreach (var alert in alerts) { alert.AlertStatus = AlertStatus.Closed; } await _context.SaveChangesAsync(); }
public async Task SaveChangesAsync(NotificationAuditType auditType = NotificationAuditType.Edited, string auditUserOverride = null) { _context.AddAuditCustomField(CustomFields.AuditDetails, auditType); if (auditUserOverride != null) { _context.AddAuditCustomField(CustomFields.OverrideUser, auditUserOverride); } await _context.SaveChangesAsync(); }
public async Task SaveChangesAsync(NotificationAuditType auditDetails = NotificationAuditType.Edited) { _context.AddAuditCustomField(CustomFields.AuditDetails, auditDetails); await _context.SaveChangesAsync(); }
public async Task AddUserLoginEvent(UserLoginEvent userLoginEvent) { await _context.UserLoginEvent.AddAsync(userLoginEvent); await _context.SaveChangesAsync(); }
private async Task UpdateDatabaseAsync() { _context.AddAuditCustomField(CustomFields.AuditDetails, NotificationAuditType.Edited); await _context.SaveChangesAsync(); }