Exemple #1
0
        /// <summary>
        /// Converts this instance of <see cref="SingleHistogram"/> to an instance of <see cref="SingleHistogramDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="SingleHistogram"/> to convert.</param>
        public static SingleHistogramDto ToDTO(this SingleHistogram entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new SingleHistogramDto();

            dto.SingleHistogramId = entity.SingleHistogramId;
            dto.SingleValue       = entity.SingleValue;
            dto.TimeStamp         = entity.TimeStamp;
            dto.VariableId        = entity.VariableId;

            entity.OnDTO(dto);

            return(dto);
        }
Exemple #2
0
        /// <summary>
        /// Converts this instance of <see cref="SingleHistogramDto"/> to an instance of <see cref="SingleHistogram"/>.
        /// </summary>
        /// <param name="dto"><see cref="SingleHistogramDto"/> to convert.</param>
        public static SingleHistogram ToEntity(this SingleHistogramDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new SingleHistogram();

            entity.SingleHistogramId = dto.SingleHistogramId;
            entity.SingleValue       = dto.SingleValue;
            entity.TimeStamp         = dto.TimeStamp;
            entity.VariableId        = dto.VariableId;

            dto.OnEntity(entity);

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