title: unable to produce data using entity framework
body: <p>I have Sale table and payment table i am able retrieve data using below sql but same result unable to produce using entity framework</p>
  
  <pre><code>select m.id,Sum(p.PaymentAmount),
   InvoiceAmount FROM Sale m
   Left Join Payment p on m.id =p.saleid
   Where m.DueDate &lt; getdate() 
   Group by m.id,InvoiceAmount
   having ISNULL(Sum(p.PaymentAmount),0) &lt; InvoiceAmount 
  </code></pre>
  
  <p>I have return Query for same but it doen`t work</p>
  
  <pre><code>_salesRepository
      .GetAll()
      .Where(m =&gt; m.DueDate &lt; DateTime.Now &amp;&amp; m.Payment.GroupBy(o =&gt; o.SaleID).Select(g =&gt; new { TotalSale = g.Sum(i =&gt; i.PaymentAmount) }).Any(g =&gt; g.TotalSale &lt; m.InvoiceAmount))
  </code></pre>