예제 #1
0
        /// <summary>
        /// Converts this instance of <see cref="PREGUNTAS"/> to an instance of <see cref="Preguntas"/>.
        /// </summary>
        /// <param name="entity"><see cref="PREGUNTAS"/> to convert.</param>
        public static Preguntas ToModel(this PREGUNTAS entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new Preguntas();

            dto.Id          = entity.Id;
            dto.Descripcion = entity.Descripcion;

            entity.OnDTO(dto);

            return(dto);
        }
예제 #2
0
        /// <summary>
        /// Converts this instance of <see cref="Preguntas"/> to an instance of <see cref="PREGUNTAS"/>.
        /// </summary>
        /// <param name="dto"><see cref="Preguntas"/> to convert.</param>
        public static PREGUNTAS ToTable(this Preguntas dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new PREGUNTAS();

            entity.Id          = dto.Id;
            entity.Descripcion = dto.Descripcion;

            dto.OnEntity(entity);

            return(entity);
        }
예제 #3
0
 /// <summary>
 /// Invoked when <see cref="ToTable"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="PREGUNTAS"/> converted from <see cref="Preguntas"/>.</param>
 static partial void OnEntity(this Preguntas dto, PREGUNTAS entity);
예제 #4
0
 /// <summary>
 /// Invoked when <see cref="ToModel"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="Preguntas"/> converted from <see cref="PREGUNTAS"/>.</param>
 static partial void OnDTO(this PREGUNTAS entity, Preguntas dto);