I have two tables in my database. A person and a coach table. The person table contains all the people and if one of the people is a coach his ID will be in the coach table.
I need to find all the people who are not coaches… yet and post them in a list.
I have tried:
var query = from es in gr.people
join esh in gr.coaches on es.id equals esh.personID
where es.id != esh.personID
select es;
And this:
var query = from es in gr.people
join esh in gr.coaches on es.id equals esh.personID
where es.id != esh.personID && es.id.hasValue
select es;
But the last one doesn’t alow the .hasValue. And so far it doesn’t work 🙁
Can anybody help me or give me a hint??
Try: