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

            var dto = new attentioninareaDto();

            dto.v_AttentionInAreaId = entity.v_AttentionInAreaId;
            dto.i_NodeId            = entity.i_NodeId;
            dto.v_Name         = entity.v_Name;
            dto.v_OfficeNumber = entity.v_OfficeNumber;
            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="attentioninareaDto"/> to an instance of <see cref="attentioninarea"/>.
        /// </summary>
        /// <param name="dto"><see cref="attentioninareaDto"/> to convert.</param>
        public static attentioninarea ToEntity(this attentioninareaDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new attentioninarea();

            entity.v_AttentionInAreaId = dto.v_AttentionInAreaId;
            entity.i_NodeId            = dto.i_NodeId;
            entity.v_Name         = dto.v_Name;
            entity.v_OfficeNumber = dto.v_OfficeNumber;
            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);
        }
 public attentioninareacomponentDto(String v_AttentioninAreaComponentId, String v_AttentionInAreaId, String v_ComponentId, Nullable <Int32> i_IsDeleted, Nullable <Int32> i_InsertUserId, Nullable <DateTime> d_InsertDate, Nullable <Int32> i_UpdateUserId, Nullable <DateTime> d_UpdateDate, attentioninareaDto attentioninarea, componentDto component)
 {
     this.v_AttentioninAreaComponentId = v_AttentioninAreaComponentId;
     this.v_AttentionInAreaId          = v_AttentionInAreaId;
     this.v_ComponentId   = v_ComponentId;
     this.i_IsDeleted     = i_IsDeleted;
     this.i_InsertUserId  = i_InsertUserId;
     this.d_InsertDate    = d_InsertDate;
     this.i_UpdateUserId  = i_UpdateUserId;
     this.d_UpdateDate    = d_UpdateDate;
     this.attentioninarea = attentioninarea;
     this.component       = component;
 }
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="attentioninarea"/> converted from <see cref="attentioninareaDto"/>.</param>
 static partial void OnEntity(this attentioninareaDto dto, attentioninarea entity);
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="attentioninareaDto"/> converted from <see cref="attentioninarea"/>.</param>
 static partial void OnDTO(this attentioninarea entity, attentioninareaDto dto);