Ejemplo n.º 1
0
        /// <summary>
        /// To the model.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns></returns>
        public static TaggedItem ToModel(this TaggedItemDto value)
        {
            TaggedItem result = new TaggedItem();

            value.CopyToModel(result);
            return(result);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Copies the properties from another TaggedItem object to this TaggedItem object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this TaggedItem target, TaggedItem source)
 {
     target.IsSystem   = source.IsSystem;
     target.TagId      = source.TagId;
     target.EntityGuid = source.EntityGuid;
     target.Id         = source.Id;
     target.Guid       = source.Guid;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Clones this TaggedItem object to a new TaggedItem 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 TaggedItem Clone(this TaggedItem source, bool deepCopy)
 {
     if (deepCopy)
     {
         return(source.Clone() as TaggedItem);
     }
     else
     {
         var target = new TaggedItem();
         target.CopyPropertiesFrom(source);
         return(target);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Copies the properties from another TaggedItem object to this TaggedItem object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this TaggedItem target, TaggedItem source)
 {
     target.Id                      = source.Id;
     target.EntityGuid              = source.EntityGuid;
     target.IsSystem                = source.IsSystem;
     target.Quantity                = source.Quantity;
     target.TagId                   = source.TagId;
     target.CreatedDateTime         = source.CreatedDateTime;
     target.ModifiedDateTime        = source.ModifiedDateTime;
     target.CreatedByPersonAliasId  = source.CreatedByPersonAliasId;
     target.ModifiedByPersonAliasId = source.ModifiedByPersonAliasId;
     target.Guid                    = source.Guid;
     target.ForeignId               = source.ForeignId;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Instantiates a new DTO object from the entity
 /// </summary>
 /// <param name="taggedItem"></param>
 public TaggedItemDto(TaggedItem taggedItem)
 {
     CopyFromModel(taggedItem);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// To the dto.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <returns></returns>
 public static TaggedItemDto ToDto(this TaggedItem value)
 {
     return(new TaggedItemDto(value));
 }