From 29970bc54ff1faa7358fa41a73ee1fa0ee63b8c9 Mon Sep 17 00:00:00 2001 From: jboinembalome Date: Wed, 3 Feb 2021 08:52:38 +0100 Subject: [PATCH] Ajout de la liste des participations dans le model Formation --- EPAServeur/Context/EpContext.cs | 1 + EPAServeur/Models/Formation/Formation.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/EPAServeur/Context/EpContext.cs b/EPAServeur/Context/EpContext.cs index 4f37516..ce485c3 100644 --- a/EPAServeur/Context/EpContext.cs +++ b/EPAServeur/Context/EpContext.cs @@ -159,6 +159,7 @@ namespace EPAServeur.Context { entity.HasKey(e => e.IdFormation); entity.Property(e => e.IdFormation).ValueGeneratedOnAdd(); + entity.HasMany(e => e.ParticipationsFormation).WithOne(e => e.Formation); }); modelBuilder.Entity(entity => diff --git a/EPAServeur/Models/Formation/Formation.cs b/EPAServeur/Models/Formation/Formation.cs index 5c51cdd..16afbcd 100644 --- a/EPAServeur/Models/Formation/Formation.cs +++ b/EPAServeur/Models/Formation/Formation.cs @@ -80,5 +80,10 @@ namespace EPAServeur.Models.Formation /// Type de formation qui est lié à la formation /// public TypeFormation TypeFormation { get; set; } + + /// + /// Liste des participations qui sont liées à la formation + /// + public List ParticipationsFormation { get; set; } } }