public override Customer ToDomain(CustomerDto customerDto)
 {
     return(Customer.CustomerBuilder.Customer()
            .WithId(string.IsNullOrWhiteSpace(customerDto.Id) ? Guid.Empty : new Guid(customerDto.Id))
            .WithLastname(customerDto.LastName)
            .WithFirstname(customerDto.FirstName)
            .WithAddress(_addressMapper.ToDomain(customerDto.Address))
            .WithEmail(_emailMapper.ToDomain(customerDto.Email))
            .WithPhoneNumber(_phoneNumberMapper.ToDomain(customerDto.PhoneNumber))
            .Build());
 }
Ejemplo n.º 2
0
 public override Customer ToDomain(CustomerDto customerDto)
 {
     return(Customer.CustomerBuilder.Customer()
            .WithId(Guid.Empty)
            .WithLastname(customerDto.LastName)
            .WithFirstname(customerDto.FirstName)
            .WithAddress(_addressMapper.ToDomain(customerDto.Address))
            .WithEmail(_emailMapper.ToDomain(customerDto.Email))
            .WithPhoneNumber(_phoneNumberMapper.ToDomain(customerDto.PhoneNumber))
            .Build());
 }