title: How to specify an Include inside a lambda expression
body: <p>I have A Rack model and a Server Model. Currently when I want to retrieve single Server I do the following, to specify explicit loading:-</p>
  
  <pre><code>public Server FindAllServer(int id)
          {
  
              return project.Servers.Where(c =&gt; c.ServerID == id)
                  .Include(a =&gt; a.OperatingSystem)
                  .Include(a2 =&gt; a2.DataCenter)
                  .Include(a3=&gt;a3.Rack)
                  .Include(a4=&gt;a4.ServerModel)
                  .Include(a5=&gt;a5.Technology)
                  .Include(a6=&gt;a6.VirtualMachines)
                  .Include(a7=&gt;a7.TechnologyStatu)
                  .Include(a8=&gt;a8.TechnologyBackUpStatu)
                  .Include(a9=&gt;a9.TechnologyRole)
                  .SingleOrDefault();
          }
  </code></pre>
  
  <p>But now I want to display a Rack and all its server/s,I did the following :-</p>
  
  <pre><code> public Rack FindAllRack(int id)
          {
  
              return project.Racks.Where(c =&gt; c.RackID == id)
                  .Include(a =&gt; a.Servers)
                  .Include(a2 =&gt; a2.DataCenter)
                  .Include(a3 =&gt; a3.Firewalls)
                  .Include(a4 =&gt; a4.Routers)
                  .Include(a5 =&gt; a5.Technology)
                  .Include(a6 =&gt; a6.StorageDevices)
                  .Include(a7=&gt;a7.Switches)
                  .Include(a8=&gt;a8.Zone)
                  .SingleOrDefault();
          }
  </code></pre>
  
  <p>so I am not sure how I can define to explicitly include all the navigation properties for the Server/s under a Rack, as I cannot write something such as:-</p>
  
  <pre><code>project.Racks.Where(c =&gt; c.RackID == id).Include(a =&gt; a.Servers.Include(………))
  </code></pre>
  
  <p>The problem is that in case I have 50 servers under a rack, then for each server there will be around 7 requests to retrieve the server navigation properties, so I will have around 350 requests !!! </p>