public async Task <Unit> Handle(ActivateMerchantAddressCommand request, CancellationToken cancellationToken) { var merchantAddress = await _merchantAddressRepository.GetAsync(request.MerchantCode, request.MerchantAddressCode); if (merchantAddress is null) { throw new MerchantAddressNotFoundException(); } merchantAddress.Activate(); await _merchantAddressRepository.UpdateIsActiveAsync(merchantAddress.MerchantName, merchantAddress.Name, merchantAddress.IsActive); await _merchantRepository.AddAddressMetaDataAsync(merchantAddress.MerchantName, merchantAddress.Name); return(Unit.Task.Result); }