I'm having a hard time wrapping my head around this requirement of a query I need.
Here is the data I have in a table:
row1 row2
A B
A C
A D
A E
E B
E C
E A
E D
I want all rows
where row1 IN ('A', 'E')
But I don't want the row where row1 = E and row2 = A.
I think in straight SQL I could do an aliased table like SELECT....AS Table1 and then select only the rows where row2 was not found in Table1, but I'm not sure how to go about this in LINQ.
Any ideas ?
EDIT: Sorry for the ambiguity of my question, but I do not know in advance the criteria where row1 in ('A', 'E'). Basically if I have retrieved a record (record1) with a specific value in row1, if I find that same specific value in row2 in another record (record2), I do not want record2.