title: How to use @bind-Value in a dynamic form?
body: <p>I am using Blazor to create a dynamic form from the properties of my model.</p>
  
  <p>I am using a <code>for each</code> loop to loop through the properties of the model.</p>
  
  <pre><code>public class SensorType
  {
      public int Id { get; set; }
      [Required]
      [MaxLength(30)]
      [Display(Name = "Sensor Type Name")]
      public string Name { get; set; }
      [Required]
      [MaxLength(500)]
      public string Description { get; set; }
      [Required]
      [MaxLength(2048)]
      [Display(Name = "Datasheet URL")]
      public string DatasheetUrl { get; set; }
  }
  </code></pre>
  
  <p>I implemented this razor view, where I try to bind to <code>public SensorType sensortype { get; set; }</code>. But I need to bind to sensortype.property where property is whatever property the model has that is in the for each loop. But I cannot simply just call say <code>@bind-Value="sensortype.property"</code>. Any ideas on how to do this? I don't want to have to manually type every field. Thanks!</p>
  
  <pre><code>&lt;EditForm Model="@sensortype" OnValidSubmit="@SaveSensorType"&gt;
  
  @foreach(var property in typeof(SensorType).GetProperties())
  {
      if(property.Name == "Id")
      {
          continue;
      }
      &lt;div class="form-group row"&gt;
          &lt;label class="col-sm-2 col-form-label"&gt;@(GetAttribute(property, false)) &lt;/label&gt; //This function get the name of the property in a human-readable way.
          &lt;div class="col-sm-10"&gt;//I would like to bind here to sensortype's property in the for each loop but sensortype.property gives me an error.
              &lt;InputTextArea class="form-control" @bind-Value="sensortype.property" value="sensortype.property.Name" placeholder="Description of the Type of Sensor" /&gt; 
          &lt;/div&gt;
      &lt;/div&gt;
  }
  </code></pre>
  
  <p></p>