From 6970bd34369ac03936194d6ce1a1058c41ca8177 Mon Sep 17 00:00:00 2001 From: jboinembalome Date: Thu, 25 Feb 2021 09:08:42 +0100 Subject: [PATCH] =?UTF-8?q?MAJ=20de=20la=20contrainte=20de=20cl=C3=A9=20?= =?UTF-8?q?=C3=A9trang=C3=A8re=20entre=20les=20participations=20et=20les?= =?UTF-8?q?=20demandes=20de=20formation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EPAServeur/Context/EpContext.cs | 4 ++-- EPAServeur/Models/Formation/ParticipationFormation.cs | 5 ----- EPAServeur/Models/SaisieChamp/Champ.cs | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/EPAServeur/Context/EpContext.cs b/EPAServeur/Context/EpContext.cs index 2378b40..104fdde 100644 --- a/EPAServeur/Context/EpContext.cs +++ b/EPAServeur/Context/EpContext.cs @@ -154,6 +154,8 @@ namespace EPAServeur.Context { entity.HasKey(e => e.IdDemandeFormation); entity.Property(e => e.IdDemandeFormation).ValueGeneratedOnAdd(); + entity.HasOne(e => e.ParticipationFormation).WithOne(e => e.DemandeFormation).HasForeignKey(d => d.IdParticipationFormation); + }); modelBuilder.Entity(entity => @@ -189,8 +191,6 @@ namespace EPAServeur.Context entity.HasKey(e => e.IdParticipationFormation); entity.Property(e => e.IdParticipationFormation).ValueGeneratedOnAdd(); entity.HasMany(e => e.Evaluation).WithOne(e => e.ParticipationFormation); - entity.HasOne(e => e.DemandeFormation).WithOne(a => a.ParticipationFormation).HasForeignKey(a => a.IdDemandeFormation); - }); modelBuilder.Entity(entity => diff --git a/EPAServeur/Models/Formation/ParticipationFormation.cs b/EPAServeur/Models/Formation/ParticipationFormation.cs index b6ebea3..56bfeac 100644 --- a/EPAServeur/Models/Formation/ParticipationFormation.cs +++ b/EPAServeur/Models/Formation/ParticipationFormation.cs @@ -26,11 +26,6 @@ namespace EPAServeur.Models.Formation /// public bool EstEvaluee { get; set; } - /// - /// Id de la demande de formation - /// - public long IdDemandeFormation { get; set; } - /// /// Demande de formation qui est lié à la participation d’un collaborateur à une formation /// diff --git a/EPAServeur/Models/SaisieChamp/Champ.cs b/EPAServeur/Models/SaisieChamp/Champ.cs index 7aefee3..b728f21 100644 --- a/EPAServeur/Models/SaisieChamp/Champ.cs +++ b/EPAServeur/Models/SaisieChamp/Champ.cs @@ -34,7 +34,7 @@ namespace EPAServeur.Models.SaisieChamp /// /// Ordre du champ dans sa section ou sa sous-section /// - public long Ordre { get; set; } + public int Ordre { get; set; } /// /// Type du champ correspondant au Type du document si c’est un champ un EP ou à l’évaluation sinon