コード例 #1
0
        public IList <Turma> ObterTurmasPorUsuarioId(int idUsuario)
        {
            BMTurmaProfessor bmTurmaProfessor = new BMTurmaProfessor();

            return(bmTurmaProfessor.ObterPorFiltro(new TurmaProfessor {
                Professor = new Usuario {
                    ID = idUsuario
                }
            }).Select(x => x.Turma).ToList());
        }
コード例 #2
0
 private static List <DTOManterTurmaProfessor> ObterListaDeProfessores(Turma turma)
 {
     using (var bmTurma = new BMTurmaProfessor())
     {
         return(bmTurma
                .ObterPorFiltro(new TurmaProfessor {
             Turma = turma
         })
                .Select(tp => new DTOManterTurmaProfessor
         {
             IDTurmaProfessor = tp.ID,
             NomeProfessor = tp.Professor.Nome,
             EmailProfessor = tp.Professor.Email,
             CPFProfessor = tp.Professor.CPF
         })
                .ToList());
     }
 }