How can I join 2 different tables on 2 columns where one column is equal and the other is not. In the example below, I need to query for records where the email matches but the NID does not.
Table A
ID NID Email
1 bob bob@asdf.com
2 mike mike@asdf.com
3 dave dave@asdf.com
Table B
ID NID Email
1 bob bob@asdf.com
2 mike mike@asdf.com
3 doug dave@asdf.com
Sample output should be from Table B:
ID NID Email
3 doug dave@asdf.com
Bonus points if you can do it in LINQ to Entities
Result:
3 doug dave@asdf.com
In conclusion just a join with a WHERE condition