title: Linq to entities Left Join
body: <p>I want to achieve the following in Linq to Entities:</p>
  
  <p>Get all Enquires that have no Application or the Application has a status != 4 (Completed)</p>
  
  <pre><code>select e.*
  from Enquiry enq
  left outer join Application app
   on enq.enquiryid = app.enquiryid
  where app.Status &lt;&gt; 4 or app.enquiryid is null
  </code></pre>
  
  <p>Has anyone done this before without using DefaultIfEmpty(), which is not supported by Linq to Entities?</p>
  
  <p>I'm trying to add a filter to an IQueryable query like this:</p>
  
  <pre><code>IQueryable&lt;Enquiry&gt; query = Context.EnquirySet; 
  
  query = (from e in query 
           where e.Applications.DefaultIfEmpty()
                               .Where(app=&gt;app.Status != 4).Count() &gt;= 1 
           select e);
  </code></pre>
  
  <p>Thanks 
  Mark </p>