Beispiel #1
0
        protected override async Task Handle(
            CountryRemoveCommand request,
            CancellationToken token)
        {
            var provinceIds = await _accountQueries
                              .GetByProvinceIds(
                request.CorrelationToken,
                request.ProvinceIds,
                token);

            if (provinceIds == null)
            {
                return;
            }

            foreach (var accountDomain in provinceIds)
            {
                accountDomain
                .ChangeStatus(
                    AccountStatusType.AddressVerificationRequired);
            }

            await _accountCommand
            .UnitOfWork
            .SaveEntitiesAsync(token);
        }