public static Grupos ToModel(this GRUPOS Table)
        {
            if (Table == null)
            {
                return(null);
            }

            return(new Grupos()
            {
                Id = Table.Id,
                Descripcion = Table.Descripcion,
                Fecha_Creacion = Table.Fecha_Creacion
            });
        }
Пример #2
0
        /// <summary>
        /// Converts this instance of <see cref="GRUPOS"/> to an instance of <see cref="Grupos"/>.
        /// </summary>
        /// <param name="entity"><see cref="GRUPOS"/> to convert.</param>
        public static Grupos ToModel(this GRUPOS entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new Grupos();

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

            entity.OnDTO(dto);

            return(dto);
        }
Пример #3
0
        /// <summary>
        /// Converts this instance of <see cref="Grupos"/> to an instance of <see cref="GRUPOS"/>.
        /// </summary>
        /// <param name="dto"><see cref="Grupos"/> to convert.</param>
        public static GRUPOS ToTable(this Grupos dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new GRUPOS();

            entity.Id             = dto.Id;
            entity.Descripcion    = dto.Descripcion;
            entity.Fecha_Creacion = DateTime.Now;

            dto.OnEntity(entity);

            return(entity);
        }
Пример #4
0
 /// <summary>
 /// Invoked when <see cref="ToTable"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="GRUPOS"/> converted from <see cref="Grupos"/>.</param>
 static partial void OnEntity(this Grupos dto, GRUPOS entity);
Пример #5
0
 /// <summary>
 /// Invoked when <see cref="ToModel"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="Grupos"/> converted from <see cref="GRUPOS"/>.</param>
 static partial void OnDTO(this GRUPOS entity, Grupos dto);