title: Calling IEnumerable overload of DisplayNameFor
body: <p>This works for grabbing the headers(<strong>NOT VALUES</strong>):</p>
  
  <pre><code>@model IEnumerable&lt;SomeModel&gt;
  ...
  &lt;th&gt;@Html.DisplayNameFor(m =&gt; m.SomeModelProperty)&lt;/th&gt;
  </code></pre>
  
  <p>Which if SomeModelProperty were:</p>
  
  <pre><code>[Display(Name = "An Excellent Header")]
  SomeModelProperty { get; set; }
  </code></pre>
  
  <p>Then it would display "An Excellent Header" in the header <code>th</code> element.</p>
  
  <p>You would think this wouldn't work because the model is IEnumerable, which wouldn't have a m.SomeModelProperty, but it works because HtmlHelper has a <code>HtmlHelper&lt;IEnumerable&lt;TModel&gt;&gt;</code> such that the parameter of the lambda is <code>TModel</code>, not <code>IEnumerable&lt;TModel&gt;</code>.  Since this just uses metadata, there is no need for an item from the collection.  (Although intellisense on <code>m.</code> will lie to you and make you think it's a collection).  I'm not sure when this cool overload was added, but is quite handy for Index.cshtml and does away with funky things like <code>@Html.DisplayNameFor(m =&gt; @Model.FirstOrDefault().SomeModelProperty)</code> which I want to avoid.</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/hh833697(v=vs.108).aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/hh833697(v=vs.108).aspx</a></p>
  
  <p>However, I can't figure out how to get this to work when my model is not IEnumerable, but instead contains IEnumerable as a property, such as:</p>
  
  <pre><code>public class SomeList
  {
     public List&lt;SomeModel&gt; SomeModels { get; set; }
     public int Page { get; set; }
     public DateTime CurrentAsOf { get; set; }
  }
  </code></pre>
  
  <p>I was hoping to be explicit with the generic type parameters, but I think the type parameters are specified by the engine that trickles down from the HtmlHelper created with the page.  Can I declare a new HtmlHelper in the page, or somehow specify the type parameters explicitly?</p>
  
  <p>Index.cshtml:</p>
  
  <pre><code>@model SomeList
  //No idea how to do this:
  @Html.DisplayNameFor&lt;IEnumerable&lt;SomeModel&gt;&gt;(m =&gt; m.SomeModelProperty)
  </code></pre>