title: Linq query makes all calls to bring foreign key's table data
body: <pre><code>from d in Customers
  select d;
  </code></pre>
  
  <p>This query makes a call for every <code>customerId</code> to get the orders where customerId = that customerId.</p>
  
  <p>This makes the call slow and long, I don't want orders data. How to disable that?</p>
  
  <p>Addtional details:</p>
  
  <p>I'm doing conditional</p>
  
  <pre><code>if (flag)
  {
     return (from d in Customers
             select d).ToList();
  }    
  else
  {
     return (from d in Customers
             where d.Orders.Count &gt; 10
             select d).ToList();
  }
  </code></pre>
  
  <p>Even in the if query it makes calls to all the Orders of each Customer which I want to prevent in both the cases.</p>