public OrderDto ToDto(Order order)
 {
     return(new OrderDto()
            .WithOrderId(order.Id.ToString("N"))
            .WithAddress(_addressMapper.ToDto(GetAddressForCustomer(order.CustomerId)))
            .WithItemGroups(order.OrderItems.Select(item => _orderItemMapper.ToDto(item)).ToArray()));
 }
 public override CustomerDto ToDto(Customer customer)
 {
     return(CustomerDtoBuilder.CustomerDto()
            .WithId(customer.Id)
            .WithFirstname(customer.FirstName)
            .WithLastname(customer.LastName)
            .WithAddress(_addressMapper.ToDto(customer.Address))
            .WithEmail(_emailMapper.ToDto(customer.Email))
            .WithPhoneNumber(_phoneNumberMapper.ToDto(customer.PhoneNumber))
            .Build());
 }