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

            var dto = new StationHistoryDTO();

            dto.ID               = entity.ID;
            dto.StationID        = entity.StationID;
            dto.Code             = entity.Code;
            dto.Name             = entity.Name;
            dto.IsActive         = entity.IsActive;
            dto.ModifiedByUserID = entity.ModifiedByUserID;
            dto.ModifiedDate     = entity.ModifiedDate;
            dto.AuditDate        = entity.AuditDate;
            entity.OnDTO(dto);

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

            var entity = new StationHistory();

            entity.ID               = dto.ID;
            entity.StationID        = dto.StationID;
            entity.Code             = dto.Code;
            entity.Name             = dto.Name;
            entity.IsActive         = dto.IsActive;
            entity.ModifiedByUserID = dto.ModifiedByUserID;
            entity.ModifiedDate     = dto.ModifiedDate;
            entity.AuditDate        = dto.AuditDate;
            dto.OnEntity(entity);

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