private static AddressType GetAddress(Model.AddressType address, Model.ContactType contact) { if (address == null) { return(null); } AddressType addrNew = new AddressType { Name = address.Name, POBox = address.POBox, Street = address.Street, Country = GetCountry(address.Country), ZIP = address.ZIP, Town = address.Town, AddressIdentifier = GetAddressIdentifier(address.AddressIdentifier), Email = new string[] { address.Email }, Phone = new string[] { address.Phone }, }; return(addrNew); }
private static AddressType GetAddress(Model.AddressType address, Model.ContactType contact) { if (address == null) { return(null); } AddressType addrNew = new AddressType { Name = address.Name, Contact = contact?.Name, Phone = address.Phone, POBox = address.POBox, Email = address.Email, Salutation = contact?.Salutation, Street = address.Street, Country = GetCountry(address.Country), ZIP = address.ZIP, Town = address.Town, AddressIdentifier = GetAddressIdentifier(address.AddressIdentifier) }; return(addrNew); }