I'm using Entity Framework 6, DotConnect for Oracle and i have these 2 queries:
First one, using a simple join (LINQ and Output SQL):
LINQ:
var joinQuery = Db.Products
.Join(Db.Product_Categories.AsEnumerable(), p => p.ProductID,
pc => pc.CategoryID, (pc, p) => new { pc, p })
.ToList();
Output SQL:
SELECT * FROM Products
Second, using Include:
LINQ:
var includeQuery = Db.Products.Include("Product_Categories").ToList();
Output SQL:
SELECT * FROM Products
LEFT OUTER JOIN Product_Categories
ON Products.CategoryID = Product_Categories.CategoryID
I am in doubt if i can always use "Include" method for left joins. This method is not clear for my.