/// <summary>
 /// Clones this AnalyticsDimFamilyHistorical object to a new AnalyticsDimFamilyHistorical object
 /// </summary>
 /// <param name="source">The source.</param>
 /// <param name="deepCopy">if set to <c>true</c> a deep copy is made. If false, only the basic entity properties are copied.</param>
 /// <returns></returns>
 public static AnalyticsDimFamilyHistorical Clone(this AnalyticsDimFamilyHistorical source, bool deepCopy)
 {
     if (deepCopy)
     {
         return(source.Clone() as AnalyticsDimFamilyHistorical);
     }
     else
     {
         var target = new AnalyticsDimFamilyHistorical();
         target.CopyPropertiesFrom(source);
         return(target);
     }
 }
 /// <summary>
 /// Copies the properties from another AnalyticsDimFamilyHistorical object to this AnalyticsDimFamilyHistorical object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this AnalyticsDimFamilyHistorical target, AnalyticsDimFamilyHistorical source)
 {
     target.Id                       = source.Id;
     target.AdultCount               = source.AdultCount;
     target.CampusId                 = source.CampusId;
     target.CampusName               = source.CampusName;
     target.CampusShortCode          = source.CampusShortCode;
     target.ChildCount               = source.ChildCount;
     target.ConnectionStatus         = source.ConnectionStatus;
     target.Count                    = source.Count;
     target.CurrentRowIndicator      = source.CurrentRowIndicator;
     target.EffectiveDate            = source.EffectiveDate;
     target.ExpireDate               = source.ExpireDate;
     target.FamilyId                 = source.FamilyId;
     target.FamilyTitle              = source.FamilyTitle;
     target.ForeignGuid              = source.ForeignGuid;
     target.ForeignKey               = source.ForeignKey;
     target.HeadOfHouseholdPersonKey = source.HeadOfHouseholdPersonKey;
     target.IsEra                    = source.IsEra;
     target.IsFamilyActive           = source.IsFamilyActive;
     target.MailingAddressCity       = source.MailingAddressCity;
     target.MailingAddressCountry    = source.MailingAddressCountry;
     target.MailingAddressCounty     = source.MailingAddressCounty;
     target.MailingAddressFull       = source.MailingAddressFull;
     target.MailingAddressGeoFence   = source.MailingAddressGeoFence;
     target.MailingAddressGeoPoint   = source.MailingAddressGeoPoint;
     target.MailingAddressLatitude   = source.MailingAddressLatitude;
     target.MailingAddressLocationId = source.MailingAddressLocationId;
     target.MailingAddressLongitude  = source.MailingAddressLongitude;
     target.MailingAddressPostalCode = source.MailingAddressPostalCode;
     target.MailingAddressState      = source.MailingAddressState;
     target.MailingAddressStreet1    = source.MailingAddressStreet1;
     target.MailingAddressStreet2    = source.MailingAddressStreet2;
     target.MappedAddressCity        = source.MappedAddressCity;
     target.MappedAddressCountry     = source.MappedAddressCountry;
     target.MappedAddressCounty      = source.MappedAddressCounty;
     target.MappedAddressFull        = source.MappedAddressFull;
     target.MappedAddressGeoFence    = source.MappedAddressGeoFence;
     target.MappedAddressGeoPoint    = source.MappedAddressGeoPoint;
     target.MappedAddressLatitude    = source.MappedAddressLatitude;
     target.MappedAddressLocationId  = source.MappedAddressLocationId;
     target.MappedAddressLongitude   = source.MappedAddressLongitude;
     target.MappedAddressPostalCode  = source.MappedAddressPostalCode;
     target.MappedAddressState       = source.MappedAddressState;
     target.MappedAddressStreet1     = source.MappedAddressStreet1;
     target.MappedAddressStreet2     = source.MappedAddressStreet2;
     target.Name                     = source.Name;
     target.Guid                     = source.Guid;
     target.ForeignId                = source.ForeignId;
 }
Example #3
0
        /// <summary>
        /// Clones this AnalyticsDimFamilyHistorical object to a new AnalyticsDimFamilyHistorical object with default values for the properties in the Entity and Model base classes.
        /// </summary>
        /// <param name="source">The source.</param>
        /// <returns></returns>
        public static AnalyticsDimFamilyHistorical CloneWithoutIdentity(this AnalyticsDimFamilyHistorical source)
        {
            var target = new AnalyticsDimFamilyHistorical();

            target.CopyPropertiesFrom(source);

            target.Id          = 0;
            target.Guid        = Guid.NewGuid();
            target.ForeignKey  = null;
            target.ForeignId   = null;
            target.ForeignGuid = null;

            return(target);
        }