title: Struggling with Lambda expression (VB .net)
body: <p>I have a relatively simple thing that I can do easily in SQL, but I'm trying to get used to using Lambda expressions, and having a hard time. </p>
  
  <p>Here is a simple example. Basically I have 2 tables. </p>
  
  <ul>
  <li>tblAction (ActionID, ActionName) </li>
  <li>tblAudit (AuditID, ActionID, Deleted)</li>
  </ul>
  
  <p>tblAudit may have an entry regarding tblAction with the Deleted flag set to 1.</p>
  
  <p>All I want to do is select actions where we don't have a Deleted entry in tblAudit. So the SQL statement is:</p>
  
  <pre><code>Select tblAction.* 
  From tblAction LEFT JOIN tblAudit on tblAction.ActionID=tblAudit.ActionID
  where tblAudit.Deleted &lt;&gt; 1
  </code></pre>
  
  <p>What would be the equivalent of the above in VB.Net's LINQ? I tried:</p>
  
  <pre><code>Context.Actions.Where(Function(act) Context.Audit
  .Where(Function(aud) aud.Deleted=False AndAlso aud.ActionID=act.ActionID)).ToList
  </code></pre>
  
  <p>But that is really an inner join type scenario where it requires that each entry in tblAction also has an Entry in tblAudit. I am using Entity Framework Code First to do the database mapping. Is there a way to define the mapping in a way where you can do this?</p>