title: How can I dynamically add data to a List property in view model in a razor view?
body: <p>I have a client needs to be able to create candidates. Candidates can have many qualifications (qualifications is model with 4 properties). The client needs to be able to add N numbers of qualifications to the employee on the creation page. </p>
  
  <p><strong>View Model</strong></p>
  
  <pre><code>public class CreateCandidateViewModel
  {
      [DisplayName("First Name"), Required]
      public string FirstName { get; set; }
  
      [DisplayName("Last Name"), Required]
      public string LastName { get; set; }
  
      [DisplayName("Email Address"), Required]
      public string Email { get; set; }
  
      [DisplayName("Phone Number"), Required]
      public string Phone { get; set; }
  
      [DisplayName("Zip Code"), Required]
      public int ZipCode { get; set; }
  
      public List&lt;Qualification&gt; Qualifications { get; set; }
  }
  </code></pre>
  
  <p><strong>Qualification Model</strong></p>
  
  <pre><code>public class Qualification
  {
      [Key]
      public int Id { get; set; }
      public int QualificationTypeId { get; set; }
      public string Name { get; set; }
      public DateTime DateStarted { get; set; }
      public DateTime DateCompleted { get; set; }
  
      [ForeignKey("QualificationTypeId")]
      public virtual QualificationType Type { get; set; }
  }
  </code></pre>
  
  <p>I have no idea how to approach this problem. I was thinking of creating the candidate first and then sending the client to another view where the client can add qualifications and so on.</p>