예제 #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 }));
     }
 }
예제 #2
0
 public void Delete(int id)
 {
     _tarefaService.Remove(id);
 }