Exemple #1
0
 /// <summary>
 /// Clones this AnalyticsFactAttendance object to a new AnalyticsFactAttendance 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 AnalyticsFactAttendance Clone(this AnalyticsFactAttendance source, bool deepCopy)
 {
     if (deepCopy)
     {
         return(source.Clone() as AnalyticsFactAttendance);
     }
     else
     {
         var target = new AnalyticsFactAttendance();
         target.CopyPropertiesFrom(source);
         return(target);
     }
 }
        /// <summary>
        /// Clones this AnalyticsFactAttendance object to a new AnalyticsFactAttendance 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 AnalyticsFactAttendance CloneWithoutIdentity(this AnalyticsFactAttendance source)
        {
            var target = new AnalyticsFactAttendance();

            target.CopyPropertiesFrom(source);

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

            return(target);
        }
Exemple #3
0
 /// <summary>
 /// Copies the properties from another AnalyticsFactAttendance object to this AnalyticsFactAttendance object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this AnalyticsFactAttendance target, AnalyticsFactAttendance source)
 {
     target.Id                            = source.Id;
     target.AreaName                      = source.AreaName;
     target.AttendanceDateKey             = source.AttendanceDateKey;
     target.AttendanceId                  = source.AttendanceId;
     target.AttendanceTypeId              = source.AttendanceTypeId;
     target.AttendanceTypeName            = source.AttendanceTypeName;
     target.CampusId                      = source.CampusId;
     target.CampusName                    = source.CampusName;
     target.CampusShortCode               = source.CampusShortCode;
     target.Count                         = source.Count;
     target.CurrentFamilyKey              = source.CurrentFamilyKey;
     target.CurrentPersonKey              = source.CurrentPersonKey;
     target.DaysSinceLastAttendanceOfType = source.DaysSinceLastAttendanceOfType;
     target.DeviceId                      = source.DeviceId;
     target.DeviceName                    = source.DeviceName;
     target.DidAttend                     = source.DidAttend;
     target.EndDateTime                   = source.EndDateTime;
     target.FamilyKey                     = source.FamilyKey;
     target.ForeignGuid                   = source.ForeignGuid;
     target.ForeignKey                    = source.ForeignKey;
     target.GroupId                       = source.GroupId;
     target.GroupName                     = source.GroupName;
     target.IsFirstAttendanceOfType       = source.IsFirstAttendanceOfType;
     target.LocationId                    = source.LocationId;
     target.LocationName                  = source.LocationName;
     target.Note                          = source.Note;
     target.PersonAliasId                 = source.PersonAliasId;
     target.PersonKey                     = source.PersonKey;
     target.RSVP                          = source.RSVP;
     target.RSVPStatus                    = source.RSVPStatus;
     target.ScheduleId                    = source.ScheduleId;
     target.ScheduleName                  = source.ScheduleName;
     target.SearchTypeName                = source.SearchTypeName;
     target.StartDateTime                 = source.StartDateTime;
     target.SundayDate                    = source.SundayDate;
     target.Guid                          = source.Guid;
     target.ForeignId                     = source.ForeignId;
 }