title: Exists query with LINQ
body: <p>I'd like to get with LINQ an employee list, these employees must have in the <code>TypeOfWorks</code> list the <code>typeofWork</code> passed (<code>Id</code>) in argument</p>
  
  <pre><code>  public class Employee 
      {   
          public virtual IList&lt;EmployeeTypeOfWork&gt; TypeOfWorks { get; set; }
      }
  
      public class EmployeeTypeOfWork 
      {
          public virtual Guid Id { get; set; }
          public virtual Employee Employee { get; set; }
          public virtual TypeOfWork TypeOfWork { get; set; }
      }
  
      public class TypeOfWork 
      {
          public virtual Guid Id { get; set; }
      }
  
      public IList&lt;Employee&gt; ListWithTypeOfWork(IList&lt;Employee&gt; Employees, 
  Guid typeOfWorkId)
      {     
          ?????       
      }
  </code></pre>
  
  <p>I tried this but I missed something I think</p>
  
  <pre><code>        var res = from p in Employees
          where (from pp in p.TypeOfWorks 
      where pp.TypeOfWork.Id == guid select pp.Id).Contains(p.Id)
          select p;
  </code></pre>