/// <summary> /// Clones this AnalyticsSourcePersonHistorical object to a new AnalyticsSourcePersonHistorical 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 AnalyticsSourcePersonHistorical Clone(this AnalyticsSourcePersonHistorical source, bool deepCopy) { if (deepCopy) { return(source.Clone() as AnalyticsSourcePersonHistorical); } else { var target = new AnalyticsSourcePersonHistorical(); target.CopyPropertiesFrom(source); return(target); } }
/// <summary> /// Clones this AnalyticsSourcePersonHistorical object to a new AnalyticsSourcePersonHistorical 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 AnalyticsSourcePersonHistorical CloneWithoutIdentity(this AnalyticsSourcePersonHistorical source) { var target = new AnalyticsSourcePersonHistorical(); target.CopyPropertiesFrom(source); target.Id = 0; target.Guid = Guid.NewGuid(); target.ForeignKey = null; target.ForeignId = null; target.ForeignGuid = null; return(target); }
/// <summary> /// Copies the properties from another AnalyticsSourcePersonHistorical object to this AnalyticsSourcePersonHistorical object /// </summary> /// <param name="target">The target.</param> /// <param name="source">The source.</param> public static void CopyPropertiesFrom(this AnalyticsSourcePersonHistorical target, AnalyticsSourcePersonHistorical source) { target.Id = source.Id; target.Age = source.Age; target.AnniversaryDate = source.AnniversaryDate; target.BirthDateKey = source.BirthDateKey; target.BirthDay = source.BirthDay; target.BirthMonth = source.BirthMonth; target.BirthYear = source.BirthYear; target.ConnectionStatusValueId = source.ConnectionStatusValueId; target.Count = source.Count; target.CurrentRowIndicator = source.CurrentRowIndicator; target.EffectiveDate = source.EffectiveDate; target.Email = source.Email; target.EmailPreference = source.EmailPreference; target.ExpireDate = source.ExpireDate; target.FirstName = source.FirstName; target.ForeignGuid = source.ForeignGuid; target.ForeignKey = source.ForeignKey; target.Gender = source.Gender; target.GivingGroupId = source.GivingGroupId; target.GivingId = source.GivingId; target.GivingLeaderId = source.GivingLeaderId; target.GraduationYear = source.GraduationYear; target.InactiveReasonNote = source.InactiveReasonNote; target.IsDeceased = source.IsDeceased; target.LastName = source.LastName; target.MaritalStatusValueId = source.MaritalStatusValueId; target.MiddleName = source.MiddleName; target.NickName = source.NickName; target.PersonId = source.PersonId; target.PhotoId = source.PhotoId; target.PrimaryFamilyId = source.PrimaryFamilyId; target.RecordStatusLastModifiedDateTime = source.RecordStatusLastModifiedDateTime; target.RecordStatusReasonValueId = source.RecordStatusReasonValueId; target.RecordStatusValueId = source.RecordStatusValueId; target.RecordTypeValueId = source.RecordTypeValueId; target.ReviewReasonNote = source.ReviewReasonNote; target.ReviewReasonValueId = source.ReviewReasonValueId; target.SuffixValueId = source.SuffixValueId; target.SystemNote = source.SystemNote; target.TitleValueId = source.TitleValueId; target.ViewedCount = source.ViewedCount; target.Guid = source.Guid; target.ForeignId = source.ForeignId; }