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