/// <summary> /// Converts this instance of <see cref="EventoDTOS"/> to an instance of <see cref="Evento"/>. /// </summary> /// <param name="dto"><see cref="EventoDTOS"/> to convert.</param> public static Evento ToEntity(this EventoDTOS dto) { if (dto == null) return null; var entity = new Evento(); entity.EventoId = dto.EventoId; entity.NombreEvento = dto.NombreEvento; entity.FechaEvento = dto.FechaEvento; entity.FechaSistema = dto.FechaSistema; entity.Eliminado = dto.Eliminado; dto.OnEntity(entity); return entity; }
/// <summary> /// Invoked when <see cref="ToEntity"/> operation is about to return. /// </summary> /// <param name="entity"><see cref="Evento"/> converted from <see cref="EventoDTOS"/>.</param> partial static void OnEntity(this EventoDTOS dto, Evento entity);