From 5e3c971282dda00dabbac9abccaf581e488e963e Mon Sep 17 00:00:00 2001 From: jboinembalome Date: Fri, 19 Feb 2021 13:47:49 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20du=20tri=20pour=20le=20nombre=20de=20pa?= =?UTF-8?q?rticipant=20=C3=A0=20une=20formation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EPAServeur/Services/FormationService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/EPAServeur/Services/FormationService.cs b/EPAServeur/Services/FormationService.cs index 147d9bb..e712c18 100644 --- a/EPAServeur/Services/FormationService.cs +++ b/EPAServeur/Services/FormationService.cs @@ -418,6 +418,11 @@ namespace EPAServeur.Services return query.OrderBy(p => p.EstCertifiee); else return query.OrderByDescending(p => p.EstCertifiee); + case "participants": + if (asc.Value) + return query.OrderBy(p => p.ParticipationsFormation.Count); + else + return query.OrderByDescending(p => p.ParticipationsFormation.Count); default: if (asc.Value) return query.OrderBy(p => p.Intitule);