title: How to convert following SQL query to Lambda expression?
body: <p>I have a following <code>SQL query</code> how can I convert to <code>lambda</code> expression</p>
  
  <p><code>select * from ContractItems 
    where ID in   (SELECT distinct contractItemId from ContractPackageItems 
    where contractPackageId in  (SELECT ID from ContractPackage
    where ContractID = 680))</code></p>
  
  <p>from the above query I need to know if row exist or not. If row exist then return true.</p>
  
  <p>-TIA</p>
  
  <p>---Update---
  Here is what I got but it is not working</p>
  
  <pre><code>(from contractItem in _entities.ContractItems
   where contractItem.ID == (from contractPackageItems in _entities.ContractPackageItems
   where contractPackageItems.ContractPackageID ==  (from contractPackage in _entities.ContractPackages where contractPackage.ContractID == contractId select contractPackage.ID) select contractPackageItems.ContractItemId).Distinct()).Any();
  </code></pre>