It seems like your desired result is to identify elements from Table1 that did not have results during the left outer join using Table2 .
In fluent notation, the approach will be similar to this:
var query = db.Table1.GroupJoin(db.Table2, t1 => t1.Id, t2 => t2.t1Id, (t1, joined) => new { t1, joined } ) .SelectMany(r => r.joined.DefaultIfEmpty(), (r, j) => new { r.t1, j }) .Where(r => rj == null) .Select(r => r.t1);
In the query syntax:
var query = from t1 in db.Table1 join t2 in db.Table2 on t1.Id equals t2.t1Id into joined from j in joined.DefaultIfEmpty() where j == null select t1;
source share