Esempio n. 1
0
 public ActionResult DeleteItem(int id)
 {
     try
     {
         var comentario = _comentarioRepository.GetById(id);
         _comentarioRepository.Delete(comentario);
         return(RedirectToAction("Index", new { usuarioId = id }));
     }
     catch (Exception)
     {
         return(View("Index", new { usuarioId = id }));
     }
 }
 public void Delete(int id)
 {
     _comentarioRepository.Delete(id);
 }