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

            var entity = new Sorteo();

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

            dto.OnEntity(entity);

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