In English I'm trying to: "Return a list of People who don't have the TeamID in their List of Teams
I have a many-to-many relationship between a Person table and a Team table so each instance of a Person has a List of Teams that they are a member of. (each Team also has a list of People)
here a Person 2 would have a list of two Team objects with ID's of 1 and 2
I'm trying to write a query that, if TeamID were 18 it would return only Persons 1 and 3 for example
This is my attempt:
var query = from p in db.People
where( query2 = from t in p.Teams
where t.ID != teamID
select t)
select p;