title: Filling POCO Object with List inside a List
body: <p>I´m attempting to fill a POCO object but I get the NullReferenceException - Object reference not set to an instance of an object, at line "<strong><em>objectAreas.position.Add(objectPositions);</em></strong>" I think I'm not initializing well but I don't see my mistake, let's see the code:</p>
  
  <p><strong>POCO OBJECT</strong></p>
  
  <pre><code>public class GenericQuery
  {
      public sealed class Areas
      {
          public int idarea { get; set; }
          public string areaname { get; set; }
          public List&lt;Positions&gt; positions { get; set; }
      }
  
      public sealed class Positions
      {
          public int idposition { get; set; }
          public string positionname { get; set; }
      }
  
      public sealed class QueryAreasPositions
      {
          public int code { get; set; }
          public string response { get; set; }
          public List&lt;Areas&gt; areas { get; set; }
      }
  }
  </code></pre>
  
  <hr>
  
  <p><strong>Filling It</strong></p>
  
  <pre><code>GenericQuery.QueryAreasPositions objectAreasPositions = new GenericQuery.QueryAreasPositions();
  
  var query = areaRepository.Get(); //Eager Loading EntityFramework List Object, see the AreaRepository at the end
  
  objectAreasPositions.code = 123;
  objectAreasPositions.response = "anything";
  
  foreach (var area in query)
      {
          GenericQuery.Areas objectAreas = new GenericQuery.Areas();
          objectAreas.idarea = area.IdArea;
          objectAreas.areaname = area.Name;
              foreach (var position in area.Position)
              {
                  GenericQuery.Positions objectPositions = new GenericQuery.Positions();
                  objectPositions.idposition = position.IdPosition;
                  objectPositions.positionname = position.Name;
                  ***objectAreas.position.Add(objectPositions);***//HERE
              }
  
          objectAreasPositions.areas.Add(objectAreas); //And maybe here
       }
  </code></pre>
  
  <p><strong>AreaRepository</strong></p>
  
  <pre><code>public List&lt;Area&gt; Get()
  {
      using (var context = new Entities())
      {
          return context.Area.Include("Position").ToList();
      }
  }
  </code></pre>
  
  <p>I would appreciate any help/guide you can give me, Thanks.</p>