public ActionResult Delete(int id) { try { TarefaDAO tarefasDatabase = new TarefaDAO(); tarefasDatabase.Deletar(id); return(RedirectToAction("Index")); } catch { return(View()); } }
public IActionResult ApagarTarefa(int IdTarefa, int IdProjeto) { _tarefaDAO.Deletar(IdTarefa); return(RedirectToAction("Detalhar", "Projeto", new { id = IdProjeto })); }