コード例 #1
0
 public List <string> SelecionarProfessorPorCurso(int idCurso)
 {
     return(TabelaProfessores
            .Where(x => x.AptoParaCursos.Contains(idCurso))
            .OrderBy(x => x.Nome)
            .Select(x => x.Nome).ToList());
 }
コード例 #2
0
 public List <string> SelecionarProfessorPorCurso(int idCurso)
 {
     //Where para adcionar condições na minha consulta
     return(TabelaProfessores
            .Where(x => x.AptoParaCurso.Contains(idCurso))
            .Select(x => x.Nome).ToList());
 }