/// <summary>
        /// Converts this instance of <see cref="workstationdangers"/> to an instance of <see cref="workstationdangersDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="workstationdangers"/> to convert.</param>
        public static workstationdangersDto ToDTO(this workstationdangers entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new workstationdangersDto();

            dto.v_WorkstationDangersId  = entity.v_WorkstationDangersId;
            dto.v_HistoryId             = entity.v_HistoryId;
            dto.i_DangerId              = entity.i_DangerId;
            dto.i_IsDeleted             = entity.i_IsDeleted;
            dto.i_InsertUserId          = entity.i_InsertUserId;
            dto.d_InsertDate            = entity.d_InsertDate;
            dto.i_UpdateUserId          = entity.i_UpdateUserId;
            dto.d_UpdateDate            = entity.d_UpdateDate;
            dto.i_NoiseSource           = entity.i_NoiseSource;
            dto.i_NoiseLevel            = entity.i_NoiseLevel;
            dto.v_TimeOfExposureToNoise = entity.v_TimeOfExposureToNoise;

            entity.OnDTO(dto);

            return(dto);
        }
        /// <summary>
        /// Converts this instance of <see cref="workstationdangersDto"/> to an instance of <see cref="workstationdangers"/>.
        /// </summary>
        /// <param name="dto"><see cref="workstationdangersDto"/> to convert.</param>
        public static workstationdangers ToEntity(this workstationdangersDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new workstationdangers();

            entity.v_WorkstationDangersId  = dto.v_WorkstationDangersId;
            entity.v_HistoryId             = dto.v_HistoryId;
            entity.i_DangerId              = dto.i_DangerId;
            entity.i_IsDeleted             = dto.i_IsDeleted;
            entity.i_InsertUserId          = dto.i_InsertUserId;
            entity.d_InsertDate            = dto.d_InsertDate;
            entity.i_UpdateUserId          = dto.i_UpdateUserId;
            entity.d_UpdateDate            = dto.d_UpdateDate;
            entity.i_NoiseSource           = dto.i_NoiseSource;
            entity.i_NoiseLevel            = dto.i_NoiseLevel;
            entity.v_TimeOfExposureToNoise = dto.v_TimeOfExposureToNoise;

            dto.OnEntity(entity);

            return(entity);
        }
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="workstationdangers"/> converted from <see cref="workstationdangersDto"/>.</param>
 static partial void OnEntity(this workstationdangersDto dto, workstationdangers entity);
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="workstationdangersDto"/> converted from <see cref="workstationdangers"/>.</param>
 static partial void OnDTO(this workstationdangers entity, workstationdangersDto dto);