Entity Framework forcing Inner Join when Left Join DefaultIfEmpty() Syntax used

c# entity-framework-6 join linq-to-entities oracle

Popular Answer

My error. I filtered this query by enclosing it in a procedure called GetEmployees(), which returned an iQueryable list:

results = HRFunctions.GetEmployees().Where(x => x.ad != null);

EntityFramework shrewdly changed the LEFT JOIN to an INNER JOIN because the WHERE clause believed AD shouldn't be null.

Now that the.Where() has been removed, AssignmentDetails is a Left Join.

2
12/15/2015 11:20:58 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow