Ejemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("Nom,Prenom,Matricule,ClasseIdClasse")] Model.Etudiant etudiant)
        {
            if (ModelState.IsValid)
            {
                _context.Add(etudiant);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(etudiant));
        }
        public async Task <IActionResult> Create([Bind("Libelle")] Model.Salle Salle)
        {
            if (ModelState.IsValid)
            {
                _context.Add(Salle);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(Salle));
        }
        public async Task <IActionResult> Create([Bind("Dateseance,Heuredebut,Heurefin,ClasseId,ProfesseurId,SalleId")] Model.Seance Seance)
        {
            if (ModelState.IsValid)
            {
                _context.Add(Seance);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(Seance));
        }