title: Find specific object in list in object in a LINQ query
body: <p>Let me explain using this code sample:</p>
  
  <pre><code>var commands1 = new List&lt;int&gt; { 1 };
  var lessons = new List&lt;lesson&gt;
  {
     new lesson
     {
        hours = new List&lt;hour&gt;
        {
           new hour { period = 1 }
        }
     }
  };
  List&lt;command&gt; commands2
  {
     get
     {
        return (
           from o in commands1
           select new command
           {
              hour = ????;
           }
        ).ToList();
     }
  }
  </code></pre>
  
  <p>and in place of the <code>????</code>. I need to get the <code>hour</code> object of which <code>period</code> corresponds to <code>o</code>. Normally I would loop through <code>lessons</code>, then loop through <code>hours</code> to check <code>hour.period</code> but I don't know how to do that in a LINQ query.</p>
  
  <p>I hope that is clear enough (and that I paraphrased the code correctly).</p>