/// <summary>
        /// To the model.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns></returns>
        public static WorkflowTrigger ToModel(this WorkflowTriggerDto value)
        {
            WorkflowTrigger result = new WorkflowTrigger();

            value.CopyToModel(result);
            return(result);
        }
 /// <summary>
 /// Clones this WorkflowTrigger object to a new WorkflowTrigger 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 WorkflowTrigger Clone(this WorkflowTrigger source, bool deepCopy)
 {
     if (deepCopy)
     {
         return(source.Clone() as WorkflowTrigger);
     }
     else
     {
         var target = new WorkflowTrigger();
         target.CopyPropertiesFrom(source);
         return(target);
     }
 }
 /// <summary>
 /// Copies the properties from another WorkflowTrigger object to this WorkflowTrigger object
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="source">The source.</param>
 public static void CopyPropertiesFrom(this WorkflowTrigger target, WorkflowTrigger source)
 {
     target.IsSystem     = source.IsSystem;
     target.IsActive     = source.IsActive;
     target.EntityTypeId = source.EntityTypeId;
     target.EntityTypeQualifierColumn = source.EntityTypeQualifierColumn;
     target.EntityTypeQualifierValue  = source.EntityTypeQualifierValue;
     target.WorkflowTypeId            = source.WorkflowTypeId;
     target.WorkflowTriggerType       = source.WorkflowTriggerType;
     target.WorkflowName = source.WorkflowName;
     target.Id           = source.Id;
     target.Guid         = source.Guid;
 }
Exemple #4
0
        /// <summary>
        /// Clones this WorkflowTrigger object to a new WorkflowTrigger 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 WorkflowTrigger CloneWithoutIdentity(this WorkflowTrigger source)
        {
            var target = new WorkflowTrigger();

            target.CopyPropertiesFrom(source);

            target.Id          = 0;
            target.Guid        = Guid.NewGuid();
            target.ForeignKey  = null;
            target.ForeignId   = null;
            target.ForeignGuid = null;

            return(target);
        }
 /// <summary>
 /// Instantiates a new DTO object from the entity
 /// </summary>
 /// <param name="workflowTrigger"></param>
 public WorkflowTriggerDto(WorkflowTrigger workflowTrigger)
 {
     CopyFromModel(workflowTrigger);
 }
 /// <summary>
 /// To the dto.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <returns></returns>
 public static WorkflowTriggerDto ToDto(this WorkflowTrigger value)
 {
     return(new WorkflowTriggerDto(value));
 }