title: using linq to filter out undesirable objects
body: <p>I wrote this linq query in this method so I can filter out any ships in my fleet that don't have a linked module(storage, life support, medical bay, etc).</p>
  
  <p>This returns true if the provided fleet has any ship with linked modules</p>
  
  <pre><code>    public bool FleetWithShipsWithLinkedModules(Fleet fleet)
      {
          var linkedModules = fleet.Ships.Any(
                                          s =&gt; s != null &amp;&amp;
                                          s.Parts != null &amp;&amp;
                                          s.Parts.LinkedModules != null);
  
          return linkedModules;
      }
  </code></pre>
  
  <p>usage:</p>
  
  <pre><code>if (FleetWithShipsWithLinkedModules(fleet))
  {
     ...do stuff
  }
  </code></pre>
  
  <p>In the database, the Parts are linked to Ships, not the Fleets. It goes Fleet > Ships > Parts </p>
  
  <p>It works about 50% of the time and I can't figure out why.  I am not sure if I it's the linq or something else.</p>
  
  <p>I was hoping someone could take a look at the linq query and let me know if it looks ok structurally and syntax-wise.</p>
  
  <p>Thanks!</p>