public IActionResult Edit(int?id) { if (id == null) { return(NotFound()); } var tarefaItem = _tarefaService.GetTarefaById(id); if (tarefaItem == null) { return(NotFound()); } return(View(tarefaItem)); }
public IActionResult Delete(int?Id) { if (Id == null) { return(NotFound()); } //It does not access EF //It access the service that uses the EF var tarefaItem = _TarefaService.GetTarefaById(Id); if (tarefaItem == null) { return(NotFound()); } return(View(tarefaItem)); }