Example #1
0
        public void TestaBusca()
        {
            DisciplinaTurmaRepository repository             = new DisciplinaTurmaRepository();
            DisciplinaTurmaService    disciplinaTurmaService = new DisciplinaTurmaService(repository);

            var retorno = disciplinaTurmaService.Select();

            Assert.True(retorno.Count > 0);
        }
        public IActionResult AdicionarMatricula(MatriculaModel matriculaModel = null)
        {
            var disciplinas = _disciplinaTurmaService.Select();

            var itens = disciplinas.Select(a => new SelectListItem
            {
                Value = $"{a.CodigoDisciplina}-{a.CodigoDaTurma}",
                Text  = $"{a.Disciplina.Nome} - Turma: {a.CodigoDaTurma}"
            }).ToList();

            ViewBag.ListaDisciplinasTurma = itens;


            return(View(new MatriculaModel()));
        }