public IActionResult DeletePOST(int id) { try { _commentaireRepository.Delete(_commentaireRepository.Find(id)); return(RedirectToAction(nameof(ArtistesController.Index), "Commentaires", new { area = "Administration" })); } catch (NullReferenceException e) { return(RedirectToAction(nameof(CommentairesController.Index), "Commentaires", new { area = "Administration" })); } }
public IActionResult Delete(int id) { _commentaireRepository.Delete(_commentaireRepository.Find(id)); return(Redirect("/administration/commentaires")); }