public async Task <IActionResult> Edit(int id, [Bind("IdMatiere,Libelle")] Model.Matiere Matiere)
        {
            if (id != Matiere.IdMatiere)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(Matiere);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MatiereExists(Matiere.IdMatiere))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(Matiere));
        }
        public async Task <IActionResult> Create([Bind("Libelle")] Model.Matiere Matiere)
        {
            if (ModelState.IsValid)
            {
                _context.Add(Matiere);
                await _context.SaveChangesAsync();

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