3
I have an entity from Many-to-Many, many students for many subjects. And I need to get all students who possess all the subjects I desire.
For example, subjects: Mathematics, Portuguese and Physics. I need to take only students who have these three subjects. If he possesses another matter, but possesses these three, all right. If he possesses only one or two of the matters in question, disregard, does not serve.
My relationship table is as follows:
tbAlunosMaterias
AlunoId
MateriaId
Is it possible to get this information through English or lambda? Something like:
var alunosDasMaterias = alunos.Contains(x => ... );
Where: students = list of all students with their respective subjects (x) = where I give the list of subjects the student must have