I am new to LINQ lambda expression and i have been stuck for a while regarding the below issue. I want to perform a left outer join and want to select the left table not the right table but the below query gives me error when I select the Left table
The "query" is an IQueryable and also the "model2"
var model = query.GroupJoin(model2,
o => o.plu,
m => m.plu,
(o, m) => new
{
SmartCoupon = o,
Product = m.DefaultIfEmpty(),
})
.SelectMany
(
a => a.SmartCoupon
);
Below is the Correct query with the right table but i need the left table
var model = query.GroupJoin(model2,
o => o.plu,
m => m.plu,
(o, m) => new
{
SmartCoupon = o,
Product = m.DefaultIfEmpty(),
})
.SelectMany
(
a => a.Product
);