DefaultIfEmpty doesn't work (OUTER JOIN)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Posts: 15
Joined: Tue 14 Jul 2009 13:56

DefaultIfEmpty doesn't work (OUTER JOIN)

Post by mars » Tue 14 Jul 2009 14:15


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

Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 14 Jul 2009 14:39

The DefaultIfEmpty method is not supported in LINQ to Entities.
The similar question was already discussed here:

Post Reply