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

            var dto = new protocolsystemuserDto();

            dto.v_ProtocolSystemUserId   = entity.v_ProtocolSystemUserId;
            dto.i_SystemUserId           = entity.i_SystemUserId;
            dto.v_ProtocolId             = entity.v_ProtocolId;
            dto.i_ApplicationHierarchyId = entity.i_ApplicationHierarchyId;
            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="protocolsystemuserDto"/> to an instance of <see cref="protocolsystemuser"/>.
        /// </summary>
        /// <param name="dto"><see cref="protocolsystemuserDto"/> to convert.</param>
        public static protocolsystemuser ToEntity(this protocolsystemuserDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new protocolsystemuser();

            entity.v_ProtocolSystemUserId   = dto.v_ProtocolSystemUserId;
            entity.i_SystemUserId           = dto.i_SystemUserId;
            entity.v_ProtocolId             = dto.v_ProtocolId;
            entity.i_ApplicationHierarchyId = dto.i_ApplicationHierarchyId;
            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="protocolsystemuser"/> converted from <see cref="protocolsystemuserDto"/>.</param>
 static partial void OnEntity(this protocolsystemuserDto dto, protocolsystemuser entity);
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="protocolsystemuserDto"/> converted from <see cref="protocolsystemuser"/>.</param>
 static partial void OnDTO(this protocolsystemuser entity, protocolsystemuserDto dto);