コード例 #1
0
        /// <summary>
        /// Converts this instance of <see cref="cuidadopreventivocomentario"/> to an instance of <see cref="cuidadopreventivocomentarioDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="cuidadopreventivocomentario"/> to convert.</param>
        public static cuidadopreventivocomentarioDto ToDTO(this cuidadopreventivocomentario entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new cuidadopreventivocomentarioDto();

            dto.v_CuidadoPreventivoComentarioId = entity.v_CuidadoPreventivoComentarioId;
            dto.v_PersonId     = entity.v_PersonId;
            dto.i_GrupoId      = entity.i_GrupoId;
            dto.i_ParametroId  = entity.i_ParametroId;
            dto.v_Comentario   = entity.v_Comentario;
            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);
        }
コード例 #2
0
        /// <summary>
        /// Converts this instance of <see cref="cuidadopreventivocomentarioDto"/> to an instance of <see cref="cuidadopreventivocomentario"/>.
        /// </summary>
        /// <param name="dto"><see cref="cuidadopreventivocomentarioDto"/> to convert.</param>
        public static cuidadopreventivocomentario ToEntity(this cuidadopreventivocomentarioDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new cuidadopreventivocomentario();

            entity.v_CuidadoPreventivoComentarioId = dto.v_CuidadoPreventivoComentarioId;
            entity.v_PersonId     = dto.v_PersonId;
            entity.i_GrupoId      = dto.i_GrupoId;
            entity.i_ParametroId  = dto.i_ParametroId;
            entity.v_Comentario   = dto.v_Comentario;
            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);
        }
コード例 #3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="cuidadopreventivocomentario"/> converted from <see cref="cuidadopreventivocomentarioDto"/>.</param>
 static partial void OnEntity(this cuidadopreventivocomentarioDto dto, cuidadopreventivocomentario entity);
コード例 #4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="cuidadopreventivocomentarioDto"/> converted from <see cref="cuidadopreventivocomentario"/>.</param>
 static partial void OnDTO(this cuidadopreventivocomentario entity, cuidadopreventivocomentarioDto dto);