title: How can I find parent records without children?
body: <p>I have the following SQL Query</p>
  
  <pre><code>SELECT T0.*
  FROM Accounting T0 
  WHERE (SELECT COUNT(ParentAccountId) FROM Accounting WHERE ParentAccountId = T0.AccountId) = 0
  </code></pre>
  
  <p>It gives me the accounts that have no child. I'm trying to use a Lambda Expression to get the same result on my code.</p>
  
  <pre><code>List&lt;Accounting&gt; Items = await _context.Accounting.Where(q =&gt; q.ParentAccountId == q.AccountId).ToListAsync();
  </code></pre>
  
  <p>How can I place the COUNT condition on my code?</p>