public void FromDto(CustomerAccountDTO dto) { this.Bvin = dto.Bvin; this.Email = dto.Email; this.FirstName = dto.FirstName; this.LastName = dto.LastName; this.Password = dto.Password; this.Salt = dto.Salt; this.TaxExempt = dto.TaxExempt; this.Notes = dto.Notes; this.PricingGroupId = dto.PricingGroupId; this.FailedLoginCount = dto.FailedLoginCount; this.LastUpdatedUtc = dto.LastUpdatedUtc; this.CreationDateUtc = dto.CreationDateUtc; this.LastLoginDateUtc = dto.LastLoginDateUtc; foreach (AddressDTO a in dto.Addresses) { Contacts.Address addr = new Contacts.Address(); addr.FromDto(a); this.Addresses.Add(addr); } this.ShippingAddress.FromDto(dto.ShippingAddress); this.BillingAddress.FromDto(dto.BillingAddress); }