Ejemplo n.º 1
0
        /// <summary>
        /// Converts this instance of <see cref="DoubleLog"/> to an instance of <see cref="DoubleLogDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="DoubleLog"/> to convert.</param>
        public static DoubleLogDto ToDTO(this DoubleLog entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new DoubleLogDto();

            dto.DoubleLogId = entity.DoubleLogId;
            dto.DoubleValue = entity.DoubleValue;
            dto.TimeStamp   = entity.TimeStamp;
            dto.VariableId  = entity.VariableId;

            entity.OnDTO(dto);

            return(dto);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Converts this instance of <see cref="DoubleLogDto"/> to an instance of <see cref="DoubleLog"/>.
        /// </summary>
        /// <param name="dto"><see cref="DoubleLogDto"/> to convert.</param>
        public static DoubleLog ToEntity(this DoubleLogDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new DoubleLog();

            entity.DoubleLogId = dto.DoubleLogId;
            entity.DoubleValue = dto.DoubleValue;
            entity.TimeStamp   = dto.TimeStamp;
            entity.VariableId  = dto.VariableId;

            dto.OnEntity(entity);

            return(entity);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="DoubleLog"/> converted from <see cref="DoubleLogDto"/>.</param>
 static partial void OnEntity(this DoubleLogDto dto, DoubleLog entity);
Ejemplo n.º 4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="DoubleLogDto"/> converted from <see cref="DoubleLog"/>.</param>
 static partial void OnDTO(this DoubleLog entity, DoubleLogDto dto);