title: FIltering data in entity using two other entities
body: <p>I have following three data tables:</p>
  
  <pre><code>public partial class category
  {
      public category()
      {
          this.subcategory = new HashSet&lt;subcategory&gt;();
      }
  
      public int category_id { get; set; }
      public string description { get; set; }
      public virtual ICollection&lt;subcategory&gt; subcategory { get; set; }
  }
  </code></pre>
  
  <p>Second Entity is </p>
  
  <pre><code> public partial class subcategory
      {
          public subcategory()
          {
              this.tracked_item = new HashSet&lt;item&gt;();
          }
  
          public int subcategory_id { get; set; }
          public int category_id { get; set; }
          public string description { get; set; } 
          public virtual ICollection&lt;item&gt; item { get; set; }
          public virtual category category { get; set; }
      }
  </code></pre>
  
  <p>Third Entity </p>
  
  <pre><code>public partial class item
  {
      public int item_id { get; set; }
      public string serial_number { get; set; }
      public string inventory_number { get; set; }
      public int subcategory_id { get; set; }
      public Nullable&lt;int&gt; manu_id { get; set; }}
      public virtual subcategory subcategory { get; set; }
      public virtual manu manu { get; set; }
  }
  </code></pre>
  
  <p>I am trying to write a method in my web api where I want to filter data using three parameters like this 
  using item as context</p>
  
  <pre><code>public IEnumerable&lt;filteredItems&gt; GetfilterItem(int category_id, int subcategory_id, int manu_id)
  {
    return DbSet.Where(c=&gt;c.category_id=category_id &amp;&amp; c.subcategory_id &amp;&amp; subcategory_id &amp;&amp; c.manu_id =manu_d).Select(d=&gt; new filteredItems() {
   ----
  }:
  </code></pre>
  
  <p>Problem I have is on <code>.Where(c=&gt;c.category_id=category_id &amp;&amp; c.subcategory_id &amp;&amp; subcategory_id &amp;&amp; c.manu_id =manu_d)</code>    Intellisense wont go pass <code>category_id</code> it is not able to go to <code>subcategory_id</code> and <code>manu_id</code></p>
  
  <p>Please let me know how to write this query properly so I can filter data based on three variables. </p>