title: Dynamically Generate the Expression for @Html.EditorFor in ASP .NET MVC
body: <p>I have a completely configurable Entity Framework Model. By configurable I mean the user can choose which fields are visible or not, required or not and read-only or not. I applied the configuration by overriding the DataAnnotationsModelMetadataProvider class, now the problem is using the Model with Html.EditorFor Helper.</p>
  
  <p>I wan't to loop through each property and add Html.EditorFor Like the following</p>
  
  <pre><code>@foreach(var field in fieldConfig)
  {
      Html.EditorFor(...Dynamicaly Created Expression...)
  }
  </code></pre>
  
  <p>EDIT:
  fieldConfig is list from ConfigTable and it contains fields like FieldName, IsRequred, IsReadOnly, OrderNo, Type</p>
  
  <p>Thank you in advance.</p>