title: Subquery with IN operator to list Entity Framework 6
body: <p>I want to do a Subquery in Entity Framework using IN operator, then, using as list and send to the view.</p>
  
  <p>This is my SQL code </p>
  
  <pre><code>select * from famProd where id in (Select famID from appNfam where appID = 1)
  </code></pre>
  
  <p>and this is my controller</p>
  
  <pre><code>public ActionResult ProductFamily(int id)
      {
          Session["appID"] = id;
  
          var famProds = from prodFam in famProd where prodFam.id == (from piv in appNfam where piv.appID  == id);
  
  
  
          return View();
  
      }
  </code></pre>
  
  <p>Hope you can help me</p>