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

            var dto = new additionalexamDto();

            dto.v_AdditionalExamId = entity.v_AdditionalExamId;
            dto.v_ServiceId        = entity.v_ServiceId;
            dto.v_PersonId         = entity.v_PersonId;
            dto.v_ProtocolId       = entity.v_ProtocolId;
            dto.v_ComponentId      = entity.v_ComponentId;
            dto.v_Commentary       = entity.v_Commentary;
            dto.i_IsProcessed      = entity.i_IsProcessed;
            dto.i_IsNewService     = entity.i_IsNewService;
            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;

            entity.OnDTO(dto);

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

            var entity = new additionalexam();

            entity.v_AdditionalExamId = dto.v_AdditionalExamId;
            entity.v_ServiceId        = dto.v_ServiceId;
            entity.v_PersonId         = dto.v_PersonId;
            entity.v_ProtocolId       = dto.v_ProtocolId;
            entity.v_ComponentId      = dto.v_ComponentId;
            entity.v_Commentary       = dto.v_Commentary;
            entity.i_IsProcessed      = dto.i_IsProcessed;
            entity.i_IsNewService     = dto.i_IsNewService;
            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;

            dto.OnEntity(entity);

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