private void Add(AddressSubAttributeDto addressSubAttributeDto) { var addressSubAttributeEntity = new AddressSubAttribute(); TransferInfo(addressSubAttributeDto, addressSubAttributeEntity); _personsAttributeEntity.AddressSubAttribute.Add(addressSubAttributeEntity); var addressSubAttribute = new UpdateAddressSubAttribute(_dbContext, _personsAttributeEntity, _addressSubAttributeDtoList, _applicationUserId); }
private void TransferInfo(AddressSubAttributeDto dto, AddressSubAttribute entity) { if (dto.IsNew) { entity.Id = Guid.NewGuid().ToString(); } entity.StreetAddress = dto.StreetAddress; entity.StreetAddress1 = dto.StreetAddress1; entity.City = dto.City; entity.State = dto.State; entity.PostCode = dto.PostCode; entity.CountryRegion = dto.CountryRegion; }