public async Task <IActionResult> ModifierMotdepasse(ModifierMotdepasseModel model) { if (ModelState.IsValid) { //Ecrire code var result = await _compteRepository.ModifierMotdepasseAsync(model); if (result.Succeeded) { ViewBag.EstReussi = true; ModelState.Clear(); return(View()); } foreach (var erreur in result.Errors) { ModelState.AddModelError("", erreur.Description); } } return(View(model)); }