@ -150,12 +150,14 @@ namespace EPAServeur.Context
} ) ;
//Formation
modelBuilder . Entity < DemandeFormation > ( entity = >
{
entity . HasKey ( e = > e . IdDemandeFormation ) ;
entity . Property ( e = > e . IdDemandeFormation ) . ValueGeneratedOnAdd ( ) ;
entity . HasOne < ParticipationFormation > ( e = > e . ParticipationFormation ) . WithOne ( e = > e . DemandeFormation ) . HasForeignKey < ParticipationFormation > ( d = > d . IdParticipationFormation ) ;
entity . HasOne < ParticipationFormation > ( e = > e . ParticipationFormation ) . WithOne ( e = > e . DemandeFormation ) . HasForeignKey < ParticipationFormation > ( "IdDemandeFormation" ) ;
entity . HasOne < OrigineDemande > ( o = > o . OrigineDemande ) . WithMany ( ) . IsRequired ( ) ;
} ) ;
modelBuilder . Entity < Formation > ( entity = >
@ -190,6 +192,7 @@ namespace EPAServeur.Context
{
entity . HasKey ( e = > e . IdParticipationFormation ) ;
entity . Property ( e = > e . IdParticipationFormation ) . ValueGeneratedOnAdd ( ) ;
entity . Property < long > ( "IdDemandeFormation" ) ;
entity . HasMany < Saisie > ( e = > e . Evaluation ) . WithOne ( e = > e . ParticipationFormation ) ;
} ) ;