I have this query in LINQ which I aggregate on the ID and sales:
var resultsales = (from so in _salesRepo.QueryNoTracking
group so by so.Id into TotaledOrders
select new Example
{
Id = TotaledOrders.Key.ToString(),
TotaledValue = TotaledOrders.Sum(s => s.TotalCost).ToString(),
Orders = TotaledOrders.ToString()
}).ToList();
Now I have this table (customerinfo
) that I want to join:
ID Name Address
---------------
1 .... .....
2 .... .....
What's the correct way to outer join with my new table stored as a variable?