// GET: Formation/Details/5
        public ActionResult Details(int id, int idCandidat)
        {
            Formation f = FS.GetById(id);

            if (f.NbParticipants > 0)
            {
                ViewBag.confirmed = true;
                f.NbParticipants -= 1;
                FS.Update(f);
                FS.Commit();
            }
            else
            {
                ViewBag.confirmed = false;
            }

            FormationViewModel formation = new FormationViewModel()
            {
                CodeFormateur  = f.CodeFormateur,
                Date           = f.Date,
                Description    = f.Description,
                Duree          = f.Duree,
                IdFormation    = f.IdFormation,
                NbParticipants = f.NbParticipants,
                NomFormation   = f.NomFormation,
                Prix           = f.Prix,
                TypeFormation  = f.TypeFormation
            };

            Candidat c = CS.GetById(idCandidat);

            ViewBag.nomCandidat    = c.Nom;
            ViewBag.prenomCandidat = c.Prenom;

            return(View(formation));
        }
        // GET api/<controller>/5
        public Formation Get(int id)
        {
            Formation f = MyService.GetById(id);

            return(f);
        }