/// <summary> /// Copies the properties from another AttendanceCheckInSession object to this AttendanceCheckInSession object /// </summary> /// <param name="target">The target.</param> /// <param name="source">The source.</param> public static void CopyPropertiesFrom(this AttendanceCheckInSession target, AttendanceCheckInSession source) { target.Id = source.Id; target.ClientIpAddress = source.ClientIpAddress; target.DeviceId = source.DeviceId; target.ForeignGuid = source.ForeignGuid; target.ForeignKey = source.ForeignKey; target.Guid = source.Guid; target.ForeignId = source.ForeignId; }
/// <summary> /// Clones this AttendanceCheckInSession object to a new AttendanceCheckInSession 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 AttendanceCheckInSession Clone(this AttendanceCheckInSession source, bool deepCopy) { if (deepCopy) { return(source.Clone() as AttendanceCheckInSession); } else { var target = new AttendanceCheckInSession(); target.CopyPropertiesFrom(source); return(target); } }
/// <summary> /// Clones this AttendanceCheckInSession object to a new AttendanceCheckInSession 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 AttendanceCheckInSession CloneWithoutIdentity(this AttendanceCheckInSession source) { var target = new AttendanceCheckInSession(); target.CopyPropertiesFrom(source); target.Id = 0; target.Guid = Guid.NewGuid(); target.ForeignKey = null; target.ForeignId = null; target.ForeignGuid = null; return(target); }