title: Entity Framework Code First Lazy Loading
body: <p>I am having two object classes</p>
  
  <pre><code>public class User
  {
      public Guid Id { get; set; }
      public string Name { get; set; }
  
      // Navigation
      public ICollection&lt;Product&gt; Products { get; set; }
  }
  
  public class Product
  {
      public Guid Id { get; set; }
  
      // Navigation
      public User User { get; set; }
      public Guid User_Id { get; set; }
  
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>When i load a user using dataContext, i get the list of Products being null (this is ok).</p>
  
  <p>If i add "virtual" keyword to Products list,</p>
  
  <pre><code>public virtual ICollection&lt;Product&gt; Products { get; set; }
  </code></pre>
  
  <p>when i load the user, i get the Products list as well.</p>
  
  <p>Why is this happening? I thought that "virtual" keyword is used for not loading the entities unless you explicit this (using an "Include" statement)</p>
  
  <p>I think i got it all wrong</p>