public IActionResult Exibir() { var _repo = new TarefaDAOEntity(); ViewBag.Tarefas = _repo.Tarefas(); ViewBag.Alunos = _repo.Alunos(); var t = _repo.Alunos(); return(View("ViewTarefas")); }
public string Consulta(int id) { TarefaDAOEntity dao = new TarefaDAOEntity(); var aluno = dao.Alunos().First(l => l.Id == id); return(aluno.ToString()); }
public IActionResult AddForm() { var _repo = new TarefaDAOEntity(); ViewBag.Alunos = _repo.Alunos(); return(View("AddTarefaForm")); }
public IActionResult Index() { var _repo = new TarefaDAOEntity(); ViewBag.Tarefa = _repo.Tarefas().Count; ViewBag.Aluno = _repo.Alunos().Count; return(View()); }
public IActionResult EditForm(int alunoId) { var _repo = new TarefaDAOEntity(); ViewBag.Aluno = _repo.Alunos().First(l => l.Id == alunoId); return(View("EditForm")); }
public IActionResult Delete(int alunoId) { var _repo = new TarefaDAOEntity(); var aluno = _repo.Alunos().First(l => l.Id == alunoId); _repo.RemoverAluno(aluno); return(View("DoneAction")); }
public IActionResult Edit(int alunoId, string nome) { var _repo = new TarefaDAOEntity(); var al = _repo.Alunos().First(l => l.Id == alunoId); al.Nome = nome; _repo.AtualizarAluno(al); return(View("DoneAction")); }