public ActionResult CreerCompte(Eleve poEleve)
 {
     using (var dal = new Dal())
     {
         if (dal.EleveExist(poEleve.Nom))
             ModelState.AddModelError(String.Empty, "L'éléve éxiste déjà");
         else
             if (ModelState.IsValid)
             {
                 dal.AjouterEtudiant(poEleve.Nom, poEleve.Prenom, poEleve.Password);
                 return RedirectToAction("login");
             }
     }
     return RedirectToAction("index", "restaurant");
 }
        public ActionResult Login(Eleve poEleve)
        {
            using (var dal = new Dal())
            {

                Eleve dbEleve = dal.Authentifier(poEleve.Nom, poEleve.Password);
                if( dbEleve != null)
                {

                    IdentitySignin(dbEleve);
                    return RedirectToAction("index", "restaurant");
                }
                else
                {
                    ModelState.AddModelError(String.Empty, "Mot de passe ou identifiant invalide");
                    return View();
                }
                    
            }
           
        }