Пример #1
0
        public async Task <IActionResult> ConcluirTarefa(int id)
        {
            var tarefaResult = await _tarefaRepository.getByid(id);

            if (tarefaResult == null)
            {
                ViewBag.Error = "Id não encontrado";
                return(RedirectToAction(nameof(GetAllPendentes)));
            }
            else
            {
                await _tarefaRepository.ConcluirTarefa(tarefaResult);

                return(RedirectToAction(nameof(GetAllConcluidas)));
            }
        }