public IActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var tarefaItem = _tarefaService.GetTarefaById(id);

            if (tarefaItem == null)
            {
                return(NotFound());
            }
            return(View(tarefaItem));
        }
Exemplo n.º 2
0
        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));
        }