title: asp.net mvc add model meta data without attributes
body: <p>In our asp.net mvc forms we will typically add attributes to our view model properties such as DisplayName, Description and Required.</p>
  
  <p>We'll then just call <code>Html.EditorFor(model =&gt; model.PropertyName)</code> for each property.</p>
  
  <p>I now have a situation where I don't have a strongly typed viewmodel to which I can apply such attributes. Instead I have a list of the following class:</p>
  
  <pre><code>public class AttributeValue
  {
      public string Name { get; set; }
      public string Description { get; set; }
      public bool Required { get;set; }
      public object AttributeValue { get; set; }
  }
  </code></pre>
  
  <p>How can I add the meta data manually using the information stored in the above class, so that the <code>EditorFor</code> helper and validation still works?</p>