Page 1 of 1

DefaultIfEmpty doesn't work (OUTER JOIN)

Posted: Tue 14 Jul 2009 14:15
by mars
Hello,

I am using query

from c in model.Customers
join p in model.Orders on c.Customer_id equals p.Customer_id into inline
from i in inline.DefaultIfEmpty()
select new {c.Customer_id}


and get error

LINQ to Entities does not recognize the ... DefaultIfEmpty method ....

What's wrong with query?
How I can build 'OUTER JOIN' SQL query?

Thanks in advance

Posted: Tue 14 Jul 2009 14:39
by AndreyR
The DefaultIfEmpty method is not supported in LINQ to Entities.
The similar question was already discussed here:
http://www.devart.com/forums/viewtopic.php?p=43652