public async Task <IActionResult> Delete(Guid?id) { var retorno = false; try { retorno = await _tarefaService.DeletarItem(id); } catch { return(NotFound()); } if (!retorno) { return(NotFound()); } return(RedirectToAction("Index")); }
public async Task <IActionResult> DeleteConfirmed(int id) { await _tarefaItemService.DeletarItem(id); return(RedirectToAction(nameof(Index))); }