title: Passing extra data to EditorTemplate
body: <p>Lets say I have a LineItem (from the over used Shopping Cart example) and I want to render it using a EditorTemplate.</p>
  
  <p>I am perfectly alright rendering it using a @Html.EditorFor(m => m.LineItems) from the parent view (partial or otherwise), but what is confusing is the best approach to pass some extra data (say a SelectList which has data coming in from the database) to the template.</p>
  
  <p>Clearly I should not be polluting the LineItem model by adding these extraneous items (which are however required from a view's perspective.)</p>
  
  <p>I am trying to see if there is a strongly typed way of doing this before resorting to ViewBag/ViewData tricks.</p>
  
  <p>I have tried creating a 'LineItem' specific view model to pass the data in, but it mangles the names being generated by MVC and ads an extra layer to the collection (as I pass in a IEnumerable&lt;> of the viewmodel to the EditorFor() call, instead of IEnumerable&lt;> of the actual LineItem)</p>
  
  <p>Also, is this a wrong use of the EditorTemplate? Is a LineItem requiring a dropdown which has options coming from a database table too much for a EditorTemplate?</p>
  
  <p>Please guide me towards the MVC nirvana. While I wait for the answers, I will tryout other ideas!</p>
  
  <p>To clarify: The reason I am considering using EditorTemplate is because of the automatic collection handling which it affords me. Otherwise the whole [id] business becomes too sticky.</p>