title: Does a nested EF select limit the records before or after they are returned?
body: <p>I have the following code:</p>
  <pre class="lang-cs prettyprint-override"><code>var currencyList = (
      from c in _context.Currencies
      select new Currency()
      {
          Id = c.Id,
          Name = c.Name,
          Rates = c.Rates.Select(r =&gt; new Rate
          { 
              Id = r.Id,
              CurrencyId = r.CurrencyId,
              Rate = r.Rate,
              EffectiveDate = r.EffectiveDate
          }).Where(p =&gt; p.EffectiveDate &gt; DateTime.Now).ToList(),
          Symbol = c.Symbol
      })
      .Include(M =&gt; M.Rates)
      .ToList();
      
  return currencyList;
  </code></pre>
  <p>My question is. Does the nested select filter after the records are returned or before? So do all the rates get returned in the query and are then limited only before being assigned? Or will only the requested rates be returned in the query?</p>