예제 #1
0
        /// <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);
        }
예제 #2
0
 /// <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;
 }
예제 #3
0
 /// <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);
     }
 }
예제 #4
0
 /// <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;
 }
예제 #5
0
 /// <summary>
 /// Instantiates a new DTO object from the entity
 /// </summary>
 /// <param name="serviceLog"></param>
 public ServiceLogDto(ServiceLog serviceLog)
 {
     CopyFromModel(serviceLog);
 }
예제 #6
0
 /// <summary>
 /// To the dto.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <returns></returns>
 public static ServiceLogDto ToDto(this ServiceLog value)
 {
     return(new ServiceLogDto(value));
 }