public SectionLeaderboardItem(Section section)
        {
            Nom = section.Nom;

            foreach (Cadet cadet in section.Cadets)
            {
                NbBilletsVendu += cadet.NbBilletsVendu;
                NbBilletsDistribue += cadet.NbBilletsDistribue;
            }
        }
        public IHttpActionResult Add(Section sectionModel)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            Section section = service.SectionAdd(sectionModel.Nom);
            service.Save();

            return Json(new SectionListItem(section));
        }
        public SectionListItem(Section section)
        {
            SectionID = section.SectionID;
            Nom = section.Nom;
            NbCadets = section.Cadets.Count;

            foreach (Cadet cadet in section.Cadets)
            {
                NbBilletsVendu += cadet.NbBilletsVendu;
                NbBilletsDistribue += cadet.NbBilletsDistribue;
            }
        }
        public SectionDetails(Section section)
        {
            SectionID = section.SectionID;
            Nom = section.Nom;
            NbCadets = section.Cadets.Count;
            Cadets = new CadetList(section.Cadets)
                .OrderBy(c => c.Nom).ThenBy(c => c.Prenom).ThenBy(c => c.Grade);

            foreach (Cadet cadet in section.Cadets)
            {
                NbBilletsVendu += cadet.NbBilletsVendu;
                NbBilletsDistribue += cadet.NbBilletsDistribue;
            }
        }
        public Section SectionAdd(string name)
        {
            Section section = new Section();
            section.Nom = name;
            section.SectionID = data.GetNextSectionID();

            data.Sections.Add(section);

            return section;
        }