public ActionResult Edit(ProfilViewModel model)
 {
     if (ModelState.IsValid)
     {
         try
         {
             gp.Renommer(model.Id, model.Nom);
             return RedirectToAction("Index");
         }
         catch(Exception ex)
         {
             ModelState.AddModelError("", "Erreur : " + ex.Message);
             return View(model);
         }
     }
     return View(model);
 }
 public ActionResult Create(ProfilViewModel model)
 {
     if (ModelState.IsValid)
     {
         try
         {
             Profil p = new Profil(model);
             gp.Ajouter(p);
             return RedirectToAction("Index");
         }
         catch(Exception ex)
         {
             ModelState.AddModelError("", "Erreur : " + ex.Message);
             return View(model);
         }
     }
     return View(model);
 }
 public ActionResult Delete(int id, ProfilViewModel model)
 {
     try
     {
         gp.Supprimer(id);
         if (gpa.ProfilActuel != null && gpa.ProfilActuel.Id == id)
         {
             gpa.ModifierProfilActuel(0, new DateTime());
         }
         return RedirectToAction("Index");
     }
     catch(Exception ex)
     {
         ModelState.AddModelError("", "Erreur : " + ex.Message);
         return View(model);
     }
 }
 // GET: Profil/Delete/5
 public ActionResult Delete(int id)
 {
     Profil p = gp.Selectionner(id);
     ProfilViewModel model = new ProfilViewModel(p);
     return View(model);
 }