title: MVC Razor Foreach loop (twice) doesn't work, bracketing error
body: <p>Given: </p>
  
  <pre><code>//A Strongly typed view model where the data is passed in perfectly.  
  &lt;table id="dt1"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;@Html.DisplayNameFor(model =&gt; model.Name)
              &lt;/th&gt;
              &lt;th&gt;@Html.DisplayNameFor(model =&gt; model.Area)
              &lt;/th&gt;
              &lt;th&gt;@Html.DisplayNameFor(model =&gt; model.Hours)
              &lt;/th&gt;
              &lt;th&gt;@Html.DisplayNameFor(model =&gt; model.Minutes)
              &lt;/th&gt;
              &lt;th&gt;@Html.DisplayNameFor(model =&gt; model.PercentOfTotal)
              &lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
  
  @foreach (var current in names)
  {
      &lt;tr&gt;
      &lt;td&gt;@current&lt;/td&gt;
      &lt;/tr&gt;
      //Notice this is the problem area.
      //I have a foreach inside of another one.  Razor seems to think I need another "}"
      //But the compiler tells me I need it at line 1 above
      var stuff = @Model.Where(p =&gt; p.Name == current);
          foreach (var item in stuff)
          {
              &lt;tr&gt;
              &lt;td&gt;@item.Area&lt;/td&gt;
              &lt;td&gt;@item.Hours&lt;/td&gt;
              &lt;td&gt;@item.Minutes&lt;/td&gt;
              &lt;td&gt;@item.PercentOfTotal&lt;/td&gt;
              &lt;/tr&gt;
          }
  }
  &lt;/table&gt;
  </code></pre>
  
  <p>No matter what I try razor doesn't like to foreach loops!  Unless I'm doing something wrong...  If I ignore the designer errors and run it, the runtime tells me I need another "}", unless I'm really tired I just can see where I'm missing a bracket.  There's no compiler errors when I remove the second foreach, but as soon as I add the 2nd one....problems.</p>