public async Task Handle(RegisterAuditEventCommand notification, CancellationToken cancellationToken) { if (!notification.IsValid()) { NotifyValidationErrors(notification); return; } var auditEvent = new AuditEvent(Guid.NewGuid(), notification.Entity, notification.EntityId, notification.Username, notification.Action); _auditEventRepository.Add(auditEvent); if (await CommitAsync()) { } }