I've looked all over at different topics on this and I'm still having problems.
I'm trying to perform a left outer join with linq. I'm not having any luck. Here's my code:
var query = dataContext.Title.Where(
t => t.JobID == jobID && dataContext.EstimateRequestTitle.Any(ert => ert.TitleID == t.TitleID));
var query2 = query.DefaultIfEmpty()
.Join(dataContext.EthicalCategory.DefaultIfEmpty() , t => t.EthicalCategoryID, ec => ec.EthicalCategoryID,
(t, ec) =>
EthicalCategoryName = ec.CategoryName,
As you can see, I've ended up adding DefaultIfEmpty ALL OVER the place and yet query2 still doesn't contain any records when query does. No matter what I do, the sql it produces always contains at least one inner join.
Can anyone help?