title: Razor helper to render tr for property in List
body: <p>I have a large amount of numerical data to spit out in a table from a List of complex objects 'Dto'. Each property in the Dto object needs a row in the table, for example...</p>
  
  <pre><code>     |dtos[0]|dtos[1]|dtos[2]|dtos[4]
  prop1|   w   |   x   |   y   |   z
  prop2|   a   |   b   |   c   |   d  
  </code></pre>
  
  <p>Ideally I'd call a helper something like this...</p>
  
  <pre><code>@RenderTr("prop 1", model.Dtos, x =&gt; x.prop1);
  @RenderTr("prop 2", model.Dtos, x =&gt; x.prop2);
  </code></pre>
  
  <p>...and it would loop through the Dtos list and spit out a td for each of the designated properties. Resulting in the following html...</p>
  
  <pre><code>&lt;tr&gt;&lt;td&gt;prop 1&lt;/td&gt;&lt;td&gt;w&lt;/td&gt;&lt;td&gt;x&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;z&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;prop 2&lt;/td&gt;&lt;td&gt;a&lt;/td&gt;&lt;td&gt;b&lt;/td&gt;&lt;td&gt;c&lt;/td&gt;&lt;td&gt;d&lt;/td&gt;&lt;/tr&gt;
  </code></pre>
  
  <p>I've tried looking into templated Razor delegates, helpers with fun and expression args but can't quite get my head around it.</p>
  
  <p><strong>Updated question to make more sense.</strong></p>