public async Task <IActionResult> SetPrimaryAddress(Guid customerId, Guid addressId)
        {
            var command = new SetPrimaryAddressCommand(customerId, addressId);

            await _messaging.SendAsync(command);

            return(Ok());
        }
Beispiel #2
0
        public async Task OnSetPrimary(SetPrimaryAddressCommand command)
        {
            Customer customer = await _customerRepo.ReadAsync(command.CustomerId);

            customer.SetPrimaryAddressTo(command.AddressId);
        }