예제 #1
0
 /// <summary>
 /// Clones this RelatedEntity object to a new RelatedEntity 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 RelatedEntity Clone(this RelatedEntity source, bool deepCopy)
 {
     if (deepCopy)
     {
         return(source.Clone() as RelatedEntity);
     }
     else
     {
         var target = new RelatedEntity();
         target.CopyPropertiesFrom(source);
         return(target);
     }
 }
예제 #2
0
 /// <summary>
 /// Copies the properties from another RelatedEntity object to this RelatedEntity object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this RelatedEntity target, RelatedEntity source)
 {
     target.Id                      = source.Id;
     target.ForeignGuid             = source.ForeignGuid;
     target.ForeignKey              = source.ForeignKey;
     target.IsSystem                = source.IsSystem;
     target.Order                   = source.Order;
     target.PurposeKey              = source.PurposeKey;
     target.QualifierValue          = source.QualifierValue;
     target.SourceEntityId          = source.SourceEntityId;
     target.SourceEntityTypeId      = source.SourceEntityTypeId;
     target.TargetEntityId          = source.TargetEntityId;
     target.TargetEntityTypeId      = source.TargetEntityTypeId;
     target.CreatedDateTime         = source.CreatedDateTime;
     target.ModifiedDateTime        = source.ModifiedDateTime;
     target.CreatedByPersonAliasId  = source.CreatedByPersonAliasId;
     target.ModifiedByPersonAliasId = source.ModifiedByPersonAliasId;
     target.Guid                    = source.Guid;
     target.ForeignId               = source.ForeignId;
 }