title: Entity Framework Core - Lazy Loading
body: <p>Bowing to my Visual Studios request, I started my latest project using Entity Framework Core (1.0.1)</p>
  
  <p>So writing my database models as I always have using the 'virtual' specifier to enable lazy loading for a List. Though when loading the parent table it appears that the child list never loads.</p>
  
  <p><strong>Parent Model</strong></p>
  
  <pre><code>public class Events
  {
      [Key]
  
      public int EventID { get; set; }
      public string EventName { get; set; }
      public virtual List&lt;EventInclusions&gt; EventInclusions { get; set; }
  }
  </code></pre>
  
  <p><strong>Child Model</strong></p>
  
  <pre><code>public class EventInclusions
  {
      [Key]
      public int EventIncSubID { get; set; }
      public string InclusionName { get; set; }
      public string InclusionDesc { get; set; }
      public Boolean InclusionActive { get; set; }
  
  }
  </code></pre>
  
  <p>Adding new records to these tables seems to work as I am used to where I can nest the EventInclusions records as a List inside the Events record.</p>
  
  <p>Though when I query this table</p>
  
  <pre><code>_context.Events.Where(e =&gt; e.EventName == "Test")
  </code></pre>
  
  <p><strong>The Issue</strong></p>
  
  <p>EventInclusions will return a null value regardless of the data behind the scenes.</p>
  
  <p>After reading a bit I am getting the feeling this is a change between EF6 which I normally use and EF Core </p>
  
  <p>I could use some help in either making a blanket Lazy Loading on statement or figuring out the new format for specifying Lazy Loading.</p>
  
  <p>Caz</p>