title: Why is my Custom Object Property in ApplicationUser null?
body: <p>I have created a custom class called <code>Person</code> to store name, address, etc. This class/model is cross-referenced from other models, including <code>ApplicationUser</code>:</p>
  
  <pre><code>public class ApplicationUser : IdentityUser
  {
      public Person Person { get; set; }
  
      public async Task&lt;ClaimsIdentity&gt; GenerateUserIdentityAsync(UserManager&lt;ApplicationUser&gt; manager)
      {
          // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
          var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
          // Add custom user claims here
          return userIdentity;
      }
  }
  </code></pre>
  
  <p>In one of my controllers, I use the following code to get the current user logged in and get it's <code>Person</code> object, like so:</p>
  
  <pre><code>        var user = UserManager.FindById(User.Identity.GetUserId());
          var person = user.Person;
  </code></pre>
  
  <p>My <code>Person</code> class is also defined in the <code>ApplicationDbContext</code>:</p>
  
  <pre><code>public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
  {
      public ApplicationDbContext()
          : base("MyContext", throwIfV1Schema: false)
      {
      }
  
      public DbSet&lt;Person&gt; People { get; set; }
  }
  </code></pre>
  
  <p>When I inspect <code>user</code>, I can see that Entity Framework populated the object, because I see the user ID, email address, password hash, everything! Everything <strong><em>except</em></strong> the <code>Person</code> property! However, I can see in the database that the corresponding row is not <code>null</code>, but has the correct ID for the <code>Person</code>.</p>
  
  <p>I'm new to ASP.NET/MVC/Entity framework and I've read that it uses lazy loading by default. Is this what I'm experiencing? If so, how do I tell Entity to use eager loading on the <code>Person</code> property? If not, what am I doing wrong?</p>