public ActionResult Create(Etudiant Etudiant)
 {
     if (ModelState.IsValid)
     {
         try
         {
             etudiantsRepo.Add(Etudiant);
             return(RedirectToAction(nameof(Index)));
         }
         catch
         {
             return(View());
         }
     }
     else
     {
         ModelState.AddModelError("", "you have problem");
         return(View());
     }
 }
Beispiel #2
0
 public bool Add(E_Model.School model)
 {
     return(dal.Add(model));
 }