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 }); }
/// <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); }
/// <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); }
/// <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);
/// <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);