protected override async Task ConfirmPermissions(IEnumerable <BCAuthorizePermission> permissions, CancellationToken cancellationToken)
        {
            foreach (var grp in permissions.GroupBy(p => p.ConsentId))
            {
                var accountAccessConsent = await _accountAccessConsentRepository.Get(grp.Key, cancellationToken);

                accountAccessConsent.Confirm(grp.Select(p => p.PermissionId));
                await _accountAccessConsentRepository.Update(accountAccessConsent, cancellationToken);
            }

            await _accountAccessConsentRepository.SaveChanges(cancellationToken);
        }
        public async Task Handle(AccountAccessConsentConfirmedEvent evt, CancellationToken cancellationToken)
        {
            var result = await _accountAccessConsentRepository.Get(evt.AggregateId, cancellationToken);

            result.Handle(evt);
            await _accountAccessConsentRepository.Update(result, cancellationToken);

            await _accountAccessConsentRepository.SaveChanges(cancellationToken);
        }