/// <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); }
/// <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; }
/// <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); } }
/// <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; }
/// <summary> /// Instantiates a new DTO object from the entity /// </summary> /// <param name="taggedItem"></param> public TaggedItemDto(TaggedItem taggedItem) { CopyFromModel(taggedItem); }
/// <summary> /// To the dto. /// </summary> /// <param name="value">The value.</param> /// <returns></returns> public static TaggedItemDto ToDto(this TaggedItem value) { return(new TaggedItemDto(value)); }