title: How to use EditorFor inside a foreach
body: <p>I have a model:</p>
  
  <pre><code>public class MyListModel
  {
      public int ID {get;set;}
      public List&lt;User&gt; Users{get;set;}
  }
  </code></pre>
  
  <p>How do I use the Html.EditorFor method inside a foreach?</p>
  
  <pre><code>@model MyListModel
  &lt;table&gt;
    &lt;tr&gt;
      &lt;th&gt;&lt;/th&gt;
    &lt;/tr&gt;
    @foreach (var item in Model.Users) {
       &lt;tr&gt;
         &lt;td&gt;
            @Html.EditorFor(item.Enabled)
         &lt;/td&gt;
       &lt;/tr&gt;
    }
  &lt;/table&gt;
  </code></pre>