protected static void FromDtoSet(FACTS.Framework.DAL.DbContext dbContext, EmployerDto dto, Employer entity, Dictionary <FACTS.Framework.Dto.BaseDto, BaseEntity> dtoEntities) { entity.BusinessTypeCode = dto.BusinessTypeCode; entity.CreateDateTime = dto.CreateDateTime; entity.CreateUserId = dto.CreateUserId; entity.EmployerId = dto.EmployerId; entity.EntityName = dto.EntityName; entity.EntityTypeCode = dto.EntityTypeCode; entity.Fein = dto.Fein; entity.HasPhysicalLocation = dto.HasPhysicalLocation; entity.HasTelecommuter = dto.HasTelecommuter; entity.IsAcquired = dto.IsAcquired; entity.IsApplyingForREIM = dto.IsApplyingForREIM; entity.IsClientOfPEO = dto.IsClientOfPEO; entity.IsExemptUnderIRS501C3 = dto.IsExemptUnderIRS501C3; entity.IsIndividualContractor = dto.IsIndividualContractor; entity.IsPresentInMultipleLoc = dto.IsPresentInMultipleLoc; entity.IsProfessionalEmployerOrg = dto.IsProfessionalEmployerOrg; entity.IsServiceBegin = dto.IsServiceBegin; entity.LiabilityDate = dto.LiabilityDate; entity.LiabilityIncurredDate = dto.LiabilityIncurredDate; entity.NoOfEmployeesPaid = dto.NoOfEmployeesPaid; entity.NoOfLocation = dto.NoOfLocation; entity.RegistrationDate = dto.RegistrationDate; entity.ReportMethodCode = dto.ReportMethodCode; entity.ServiceBeginDate = dto.ServiceBeginDate; entity.StatusCode = dto.StatusCode; entity.StatusDate = dto.StatusDate; entity.SubjectivityCode = dto.SubjectivityCode; entity.UpdateDateTime = dto.UpdateDateTime; entity.UpdateNumber = dto.UpdateNumber; entity.UpdateProcess = dto.UpdateProcess; entity.UpdateUserId = dto.UpdateUserId; entity.UserName = dto.UserName; if (dto.AddressLinks != null) { foreach (AddressLinkDto addressLink in dto.AddressLinks) { entity.AddressLinks.Add(DbEntities.AddressLink.FromDto(dbContext, addressLink, dtoEntities)); } } if (dto.EmployerAccountTransactions != null) { foreach (EmployerAccountTransactionDto employerAccountTransaction in dto.EmployerAccountTransactions) { entity.EmployerAccountTransactions.Add(DbEntities.EmployerAccountTransaction.FromDto(dbContext, employerAccountTransaction, dtoEntities)); } } if (dto.EmployerContacts != null) { foreach (EmployerContactDto employerContact in dto.EmployerContacts) { entity.EmployerContacts.Add(DbEntities.EmployerContact.FromDto(dbContext, employerContact, dtoEntities)); } } entity.EmployerLiability = (dto.EmployerLiability == null) ? null : EmployerLiability.FromDto(dbContext, dto.EmployerLiability, dtoEntities); entity.EmployerPreference = (dto.EmployerPreference == null) ? null : EmployerPreference.FromDto(dbContext, dto.EmployerPreference, dtoEntities); if (dto.EmployerUnits != null) { foreach (EmployerUnitDto employerUnit in dto.EmployerUnits) { entity.EmployerUnits.Add(DbEntities.EmployerUnit.FromDto(dbContext, employerUnit, dtoEntities)); } } if (dto.PaymentMains != null) { foreach (PaymentMainDto paymentMain in dto.PaymentMains) { entity.PaymentMains.Add(DbEntities.PaymentMain.FromDto(dbContext, paymentMain, dtoEntities)); } } if (dto.PaymentProfiles != null) { foreach (PaymentProfileDto paymentProfile in dto.PaymentProfiles) { entity.PaymentProfiles.Add(DbEntities.PaymentProfile.FromDto(dbContext, paymentProfile, dtoEntities)); } } if (dto.TaxableAmountSums != null) { foreach (TaxableAmountSumDto taxableAmountSum in dto.TaxableAmountSums) { entity.TaxableAmountSums.Add(DbEntities.TaxableAmountSum.FromDto(dbContext, taxableAmountSum, dtoEntities)); } } if (dto.VoluntaryPlanWaiverRequests != null) { foreach (VoluntaryPlanWaiverRequestDto voluntaryPlanWaiverRequest in dto.VoluntaryPlanWaiverRequests) { entity.VoluntaryPlanWaiverRequests.Add(DbEntities.VoluntaryPlanWaiverRequest.FromDto(dbContext, voluntaryPlanWaiverRequest, dtoEntities)); } } if (dto.WageUnitDetails != null) { foreach (WageUnitDetailDto wageUnitDetail in dto.WageUnitDetails) { entity.WageUnitDetails.Add(DbEntities.WageUnitDetail.FromDto(dbContext, wageUnitDetail, dtoEntities)); } } }