Exemplo n.º 1
0
        /// <summary>
        /// Converts this instance of <see cref="log"/> to an instance of <see cref="logDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="log"/> to convert.</param>
        public static logDto ToDTO(this log entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new logDto();

            dto.v_LogId           = entity.v_LogId;
            dto.i_NodeLogId       = entity.i_NodeLogId;
            dto.i_EventTypeId     = entity.i_EventTypeId;
            dto.v_OrganizationId  = entity.v_OrganizationId;
            dto.d_Date            = entity.d_Date;
            dto.i_SystemUserId    = entity.i_SystemUserId;
            dto.v_ProcessEntity   = entity.v_ProcessEntity;
            dto.v_ElementItem     = entity.v_ElementItem;
            dto.i_Success         = entity.i_Success;
            dto.v_ErrorException  = entity.v_ErrorException;
            dto.v_ComentaryUpdate = entity.v_ComentaryUpdate;

            entity.OnDTO(dto);

            return(dto);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Converts this instance of <see cref="logDto"/> to an instance of <see cref="log"/>.
        /// </summary>
        /// <param name="dto"><see cref="logDto"/> to convert.</param>
        public static log ToEntity(this logDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new log();

            entity.v_LogId           = dto.v_LogId;
            entity.i_NodeLogId       = dto.i_NodeLogId;
            entity.i_EventTypeId     = dto.i_EventTypeId;
            entity.v_OrganizationId  = dto.v_OrganizationId;
            entity.d_Date            = dto.d_Date;
            entity.i_SystemUserId    = dto.i_SystemUserId;
            entity.v_ProcessEntity   = dto.v_ProcessEntity;
            entity.v_ElementItem     = dto.v_ElementItem;
            entity.i_Success         = dto.i_Success;
            entity.v_ErrorException  = dto.v_ErrorException;
            entity.v_ComentaryUpdate = dto.v_ComentaryUpdate;

            dto.OnEntity(entity);

            return(entity);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="log"/> converted from <see cref="logDto"/>.</param>
 static partial void OnEntity(this logDto dto, log entity);
Exemplo n.º 4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="logDto"/> converted from <see cref="log"/>.</param>
 static partial void OnDTO(this log entity, logDto dto);