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

            var dto = new ROLESDTO();

            dto.IDROL = entity.IDROL;
            dto.CODROL = entity.CODROL;
            dto.NOMROL = entity.NOMROL;
            dto.ESTADO = entity.ESTADO;

            entity.OnDTO(dto);

            return dto;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Invoked when <see cref="ToDTO"/> operation is about to return.
        /// </summary>
        /// <param name="dto"><see cref="ROLESDTO"/> converted from <see cref="ROLES"/>.</param>
partial         static void OnDTO(this ROLES entity, ROLESDTO dto);