public async Task <IActionResult> Create([Bind("PersonneID,Nom,Prenom")] Personne personne) { if (ModelState.IsValid) { _context.Add(personne); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(personne)); }
public async Task <IActionResult> Create([Bind("FormationID,PersonneID,Titre,Duree,Date_Deb")] Formation formation) { if (ModelState.IsValid) { _context.Add(formation); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(formation)); }