title: How to write not equal operator in linq to sql?
body: <pre><code>using (RapidWorkflowDataContext context = new RapidWorkflowDataContext())
                      {
                          var query = from w in context.WorkflowInstances
                          from c in context.Workflows 
                           where EmpWorkflowIDs.Contains((int)w.ID) &amp;&amp; w.CurrentStateID != c.LastStateID
                           select w;
  
                          return query.ToList();
                      }
  </code></pre>
  
  <p>I have 2 tables: Workflows and WorkflowInstances.</p>
  
  <p>Workflows to store objects and workflowInstances to store instances.</p>
  
  <p>Workflows Table: ID,Name,FirstStateID,LastStateID</p>
  
  <p>WorkflowInstances Table: ID,Name,WorkflowID,CurrentStateID </p>
  
  <p>How to write a query in linq to sql to select the instances from WorkflowInstances which CurrentStateID not equal LastStateID</p>