I've got a problem with a where clause in a subcollection, the situation is like this.
I've got a collection of schools, in that collection there's an other collection of students. I want to perform a where clause in de student collection.
So, its like this:
- Id: Guid
- Name: string
- Address: string
- Director: string
- List<students> (- Id: Guid, - Age: int, - Address: string, - Study: string)
I want to do something like this (which doesn't work... ), so I only pass all the schools with all the students who study IT.
CheckStudents(School.Where(s => s.Students.Where(s => s.Study == "IT")))
The method signature CheckStudents looks like this: CheckStudents(List<schools>)
Can anyone help me out on this?
Thanks in advance!