Is it possible to use LINQ to retrieve a list that may contain nulls.
For example if I have a left outer join like so:
var query= from c in db.Customers
join o in db.Orders
on c.CustomerID equals o.CustomerID into sr
from x in sr.DefaultIfEmpty()
select x.OrderId;
How do I get to a List that could look like {12,13,null,14,null,11,16,17}?
This doesn't work for me:
query.ToList<decimal?>();
Is it possible?