public ActionResult Index() { ViewBag.Alunos = _alunoService.BuscarTodos(); ViewBag.AlunoNome = ""; ViewBag.Tarefas = new List <Tarefa>(); ViewBag.IdAluno = -1; return(View()); }
public async Task <ActionResult <IEnumerable <AlunoViewModel> > > ObterTodos() { try { var listaAlunos = await _alunoService.BuscarTodos(); return(Ok(_mapper.Map <IEnumerable <AlunoViewModel> >(listaAlunos))); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public ActionResult Index() { ViewBag.Alunos = _alunoService.BuscarTodos(); return(View()); }