public IEnumerable <tcIncome> TransferDTIncomesToTCIncomes(CertificationTransferUnitOfWork uow, tcDTFamilyMember dtFamilyMember, tcFamilyMember familyMember)
        {
            tcIncome newIncome = null;

            foreach (tcDTIncome dtIncome in dtFamilyMember.tcDTIncomes)
            {
                newIncome = new tcIncome
                {
                    tcFamilyMember     = familyMember,
                    IncomeDescription  = dtIncome.IncomeDescription,
                    ExternalKey        = dtIncome.ExternalKey,
                    YearlyIncomeAmount = dtIncome.YearlyIncomeAmount,
                    tcIncomeType       = uow.IncomeTypeRepository.Get(t => t.IncomeType.Trim().ToLower() == dtIncome.tcDTIncomeType.IncomeType.Trim().ToLower() &&
                                                                      t.IsActive).SingleOrDefault(),
                    IsActive = true
                };

                uow.IncomeRepository.Insert(newIncome);

                //remove the income records
                //uow.IncomeRepository.Delete(newIncome.PK);
            }


            return(uow.IncomeRepository.InternalCollection);
        }
        public IEnumerable <tcAsset> TransferDTAssetsToTCAssets(CertificationTransferUnitOfWork uow, tcDTFamilyMember dtFamilyMember, tcFamilyMember familyMember)
        {
            tcAsset newAsset = null;

            foreach (tcDTAsset dtAsset in dtFamilyMember.tcDTAssets)
            {
                newAsset = new tcAsset
                {
                    tcFamilyMember   = familyMember,
                    AssetDescription = dtAsset.AssetDescription,
                    ExternalKey      = dtAsset.ExternalKey,
                    AnnualIncome     = dtAsset.AnnualIncome,
                    Value            = dtAsset.Value,
                    WithdrawlPenalty = dtAsset.WithdrawlPenalty
                };

                uow.AssetRepository.Insert(newAsset);

                //remove the dt assets
                //uow.DTAssetRepository.Delete(dtAsset.PK);
            }

            return(uow.AssetRepository.InternalCollection);
        }