Пример #1
0
        /// <summary>
        /// Converts this instance of <see cref="Sorteo"/> to an instance of <see cref="SorteoDTOS"/>.
        /// </summary>
        /// <param name="entity"><see cref="Sorteo"/> to convert.</param>
        public static SorteoDTOS ToDTO(this Sorteo entity)
        {
            if (entity == null) return null;

            var dto = new SorteoDTOS();

            dto.SorteoId = entity.SorteoId;
            dto.EventoId = entity.EventoId;
            dto.PremioSorteo = entity.PremioSorteo;
            dto.FechaSistema = entity.FechaSistema;
            dto.Eliminado = entity.Eliminado;

            entity.OnDTO(dto);

            return dto;
        }
Пример #2
0
        /// <summary>
        /// Invoked when <see cref="ToDTO"/> operation is about to return.
        /// </summary>
        /// <param name="dto"><see cref="SorteoDTOS"/> converted from <see cref="Sorteo"/>.</param>
partial         static void OnDTO(this Sorteo entity, SorteoDTOS dto);