title: How to add a list of objects inside a list in C# MVC
body: <p>I have a view model containing list of sections like below. I need to create a list of ResponseEntryViewModel and add sections and sub sections inside sections and questions inside subsections.</p>
  
  <p>Any suggestions?</p>
  
  <pre><code>public class ResponseEntryViewModel
  {
      public int TypeID { get; set; }
      public string TypeName { get; set; }
      public int User_ID { get; set; }
      public List&lt;SectionDataModel&gt; Sections{ get; set; }
  
      public ResponseEntryViewModel()
      {
          Sections = new List&lt;SectionDataModel&gt;();           
      }
  
      public class SectionDataModel
      {
          public int SectionID { get; set; }
          public string Name { get; set; }
          public string Status { get; set; }
          public int TypeId { get; set; }
          public List&lt;SubSectionModel&gt; SubSections { get; set; }
          public SectionDataModel()
          {
              SubSections = new List&lt;SubSectionModel&gt;();
          }
      }
  
      public class SubSectionModel
      {
          public int SubSectionID { get; set; }
          public string Name { get; set; }
          public string Status { get; set; }
          public int SectionId { get; set; }
          public List&lt;QuestionModel&gt; QuestionsList { get; set; }
          public SubSectionModel()
          {
  
              QuestionsList = new List&lt;QuestionModel&gt;();
          }
      }
  
      public class QuestionModel
      {
          public int SubSectionID { get; set; }
          public int QuestionID { get; set; }
          public string Question { get; set; }
      }
  }
  </code></pre>