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

            value.CopyToModel(result);
            return(result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Copies the properties from another DefinedType object to this DefinedType object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this DefinedType target, DefinedType source)
 {
     target.IsSystem    = source.IsSystem;
     target.FieldTypeId = source.FieldTypeId;
     target.Order       = source.Order;
     target.Category    = source.Category;
     target.Name        = source.Name;
     target.Description = source.Description;
     target.Id          = source.Id;
     target.Guid        = source.Guid;
 }
 /// <summary>
 /// Clones this DefinedType object to a new DefinedType 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 DefinedType Clone(this DefinedType source, bool deepCopy)
 {
     if (deepCopy)
     {
         return(source.Clone() as DefinedType);
     }
     else
     {
         var target = new DefinedType();
         target.CopyPropertiesFrom(source);
         return(target);
     }
 }
 /// <summary>
 /// Copies the properties from another DefinedType object to this DefinedType object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this DefinedType target, DefinedType source)
 {
     target.Id                      = source.Id;
     target.CategoryId              = source.CategoryId;
     target.Description             = source.Description;
     target.FieldTypeId             = source.FieldTypeId;
     target.HelpText                = source.HelpText;
     target.IsSystem                = source.IsSystem;
     target.Name                    = source.Name;
     target.Order                   = source.Order;
     target.CreatedDateTime         = source.CreatedDateTime;
     target.ModifiedDateTime        = source.ModifiedDateTime;
     target.CreatedByPersonAliasId  = source.CreatedByPersonAliasId;
     target.ModifiedByPersonAliasId = source.ModifiedByPersonAliasId;
     target.Guid                    = source.Guid;
     target.ForeignId               = source.ForeignId;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Instantiates a new DTO object from the entity
 /// </summary>
 /// <param name="definedType"></param>
 public DefinedTypeDto(DefinedType definedType)
 {
     CopyFromModel(definedType);
 }
Exemplo n.º 6
0
 /// <summary>
 /// To the dto.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <returns></returns>
 public static DefinedTypeDto ToDto(this DefinedType value)
 {
     return(new DefinedTypeDto(value));
 }