Example #1
0
 public ActionResult Deletar(int idTarefa)
 {
     try
     {
         _TarefaService.Remove(idTarefa);
         return(RedirectToAction("../Home/" + nameof(HomeController.Index)));
     }
     catch (IntegrityException e)
     {
         return(RedirectToAction(nameof(Error), new { menssagem = e.Message }));
     }
 }
Example #2
0
 public void Delete(int id)
 {
     _tarefaService.Remove(id);
 }