title: asp.net mvc 3 razor view -> strongly typed List of tuple problem
body: <p>I'm having an odd problem with asp.net MVC razor view. </p>
  
  <p>I want my model to be a <code>List&lt;Tuple&lt;string, int, int, int, int&gt;&gt;</code> which is perfectly valid in my other c# methods. But when I paste it into the <code>@model</code> declaration it seems to only pick out the string part of the tuple. So I have no ints. Only item1.</p>
  
  <p>This problem is not present if I make it bind to a Tuple instead of the List. </p>
  
  <p>Seems like the generated code is wrong, so perhaps this is a bug in razor view?</p>
  
  <p>The error I get at compilation is:</p>
  
  <pre><code>Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 
  
  Compiler Error Message: CS1003: Syntax error, '&gt;' expected
  
  Source Error:
  
  
  Line 27:     
  Line 28:     
  Line 29:     public class _Page_Views_Dashboard_DestinationStatistics_cshtml : System.Web.Mvc.WebViewPage&lt;List&lt;Tuple&lt;string {
  Line 30:         
  Line 31: #line hidden
  </code></pre>
  
  <p>To isolate this problem I did the following thing:</p>
  
  <p>Create an empty asp.net mvc project. Create a new view. Past the following code.</p>
  
  <pre><code>@model List&lt;Tuple&lt;string, int, int, int, int&gt;&gt;
  
  @foreach (var stat in Model)
  {
      &lt;tr&gt;
          &lt;td&gt;
              @stat.Item1
          &lt;/td&gt;
          &lt;td&gt;
              @stat.Item2
          &lt;/td&gt;
          &lt;td&gt;
              @stat.Item3
          &lt;/td&gt;
          &lt;td&gt;
              @stat.Item4
          &lt;/td&gt;
          &lt;td&gt;
              @stat.Item5
          &lt;/td&gt;
      &lt;/tr&gt;
  }
  </code></pre>
  
  <p>I know I can just create a class or a struct to hold the data instead. Just asking out of curiosity</p>
  
  <p><strong>EDIT:</strong>
  Solved and reported to the MVC team here <a href="http://aspnet.codeplex.com/workitem/8652">http://aspnet.codeplex.com/workitem/8652</a></p>