/// <summary> /// To the model. /// </summary> /// <param name="value">The value.</param> /// <returns></returns> public static ServiceLog ToModel(this ServiceLogDto value) { ServiceLog result = new ServiceLog(); value.CopyToModel(result); return(result); }
/// <summary> /// Copies the properties from another ServiceLog object to this ServiceLog object /// </summary> /// <param name="target">The target.</param> /// <param name="source">The source.</param> public static void CopyPropertiesFrom(this ServiceLog target, ServiceLog source) { target.LogDateTime = source.LogDateTime; target.Input = source.Input; target.Type = source.Type; target.Name = source.Name; target.Result = source.Result; target.Success = source.Success; target.Id = source.Id; target.Guid = source.Guid; }
/// <summary> /// Clones this ServiceLog object to a new ServiceLog 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 ServiceLog Clone(this ServiceLog source, bool deepCopy) { if (deepCopy) { return(source.Clone() as ServiceLog); } else { var target = new ServiceLog(); target.CopyPropertiesFrom(source); return(target); } }
/// <summary> /// Copies the properties from another ServiceLog object to this ServiceLog object /// </summary> /// <param name="target">The target.</param> /// <param name="source">The source.</param> public static void CopyPropertiesFrom(this ServiceLog target, ServiceLog source) { target.Id = source.Id; target.Input = source.Input; target.LogDateTime = source.LogDateTime; target.Name = source.Name; target.Result = source.Result; target.Success = source.Success; target.Type = source.Type; 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="serviceLog"></param> public ServiceLogDto(ServiceLog serviceLog) { CopyFromModel(serviceLog); }
/// <summary> /// To the dto. /// </summary> /// <param name="value">The value.</param> /// <returns></returns> public static ServiceLogDto ToDto(this ServiceLog value) { return(new ServiceLogDto(value)); }