title: Using a custom editor template for list property
body: <p>I've almost got it working, but I am missing a <strong>tiny</strong> bit of knowledge to make this work, it is a quick fix I know it. </p>
  
  <p>I am putting two ViewModels into a single view:</p>
  
  <pre><code>public class MajorViewModel
  {
      public ICollection&lt;Major&gt; Majors { get; set; }
  }
  public class MinorViewModel
  {
      public ICollection&lt;Minor&gt; Minors { get; set; }
  }
  </code></pre>
  
  <p>Into a view like so:</p>
  
  <pre><code>&lt;snip&gt;
  @Html.Partial("_MajorPartial")
  @Html.Partial("_MinorPartial")
  &lt;snip&gt;
  </code></pre>
  
  <p>Whose views look like:</p>
  
  <pre><code>// _MajorPartial
  @using Microsoft.AspNet.Identity
  @model ClassPlannerMVC.ViewModels.MajorViewModel
  
  @using (Html.BeginForm())
  {
       //@Html.EditorFor(m =&gt; m.Majors) ?? I'm not able to use this here
  }
  
  // _MinorPartial
  looks the same except "Major" is changed to "Minor"
  </code></pre>
  
  <p>And then I have two views in Views/Shared/EditorTemplates/Major.cshtml and Minor.cshtml</p>
  
  <pre><code>// Major.csthml
  @model ClassPlannerMVC.Models.Major
  
  @Html.HiddenFor(m =&gt; m.ID)
  
  &lt;div class="form-group"&gt;
      @Html.LabelFor(m =&gt; m.Name, new { @class = "col-md-2 control-label" })
      &lt;div class="col-md-10"&gt;
          @Html.EditorFor(m =&gt; m.Name, new { @class = "form-control" })
      &lt;/div&gt;
  &lt;/div&gt;
  
  // Minor.cshtml
  looks the same except "Major" is changed to "Minor"
  </code></pre>
  
  <p>My two models are:</p>
  
  <pre><code>public class Major
  {
      public int ID { get; set; }
      public string Name { get; set; }
  
      public virtual ICollection&lt;UserHasMajor&gt; UserHasMajors { get; set; }
  }
  
  public class Minor
  {
      public int ID { get; set; }
      public string Name { get; set; }
  
      public virtual ICollection&lt;UserHasMinor&gt; UserHasMinors { get; set; }
  }
  </code></pre>
  
  <hr>
  
  <p>Currently the view doesn't show my view models (MajorViewModel, MinorViewModel), which will display editors for Major and Minor respectively. I know I might be passing something wrong into the _MajorPartial and _MinorPartial views, and that is why I cannot add a @Html.EditorFor(x => x.Majors) which will display my custom editor template. There is something very minor missing in my code, do you spot the error I am having?</p>
  
  <p>I'll upload more code if it is necessary.</p>