title: LINQ 3 times nested foreach and get value from middle loop
body: <p>In my application I have the row id and I need to retrieve the field id that owns that row.</p>
  
  <p>In foreach I would write it like this:</p>
  
  <pre><code>Field ownerField;
  
  foreach (Sparter sparter in account.GetSparters())
  {
      foreach (Field field in sparter.GetFields())
      {
          foreach (Row row in field.GetRows())
          {
              if (row.Id == rowId)
              {
                  ownerField = field;
              }
          }
      }
  }
  </code></pre>
  
  <p>But how do I write this in LINQ? I thought it should be something like this, but this is not correct: </p>
  
  <pre><code>Field field = account.GetSparters()
      .SelectMany(s =&gt; s.GetFields()
      .Find(f =&gt; f.GetRows()
      .Where(r =&gt; r.Id.Equals(rowId))));
  </code></pre>