title: LINQ-All condition
body: <p>I have a Class :</p>
  
  <pre><code>Public Class Task
  {
      Public Guid TaskId { get ; set }
      Public Guid ParentId { get ; set }
      ...
  }
  </code></pre>
  
  <p>And Another class :</p>
  
  <pre><code>Public Class ContractDetail
  {
      Public Guid ContractDetailsID {get;set}
      Public Guid TaskId { get;set}
      ...
  }
  </code></pre>
  
  <p>I want to check if all Tasks have ContractDetail then do some thing and I wrote this query:</p>
  
  <pre><code> List&lt;Guid&gt; Sids = new List&lt;Guid&gt;();
   Sids = Tasks.Where(p =&gt; p.ParentId == ParentId).Select(p =&gt; p.TaskId).ToList();
   if(ContractDetails.All(p =&gt; Sids.Contains(p.TaskId))
   {
        int i = 5;
        .....
   }
  </code></pre>
  
  <p>But it returns false always.</p>
  
  <p>How to check All of Tasks have ContractDetails or not?</p>