title: Access custom ApplicationUser property from view in ASP.net Core 2
body: <p>I extended the <code>ApplicationUser</code> class to have 2 extra properties, <code>FirstName</code> and <code>LastName</code>. Both properties are persisted correctly in the database.</p>
  
  <pre><code>public class ApplicationUser : IdentityUser
  {
      [Required]
      [StringLength(100)]
      public string FirstName { get; set; }
  
      [Required]
      [StringLength(100)]
      public string LastName { get; set; }
  }
  </code></pre>
  
  <p>I am following a simple beginner example, and the code in question is as generated by the New Project with User Authentication command:</p>
  
  <pre><code>@inject SignInManager&lt;ApplicationUser&gt; SignInManager
  @inject UserManager&lt;ApplicationUser&gt; UserManager
  
  @if (SignInManager.IsSignedIn(User))
  {
      &lt;form asp-area="" asp-controller="Account" asp-action="Logout" method="post" id="logoutForm" class="navbar-right"&gt;
          &lt;ul class="nav navbar-nav navbar-right"&gt;
              &lt;li&gt;
                  &lt;a asp-area="" asp-controller="Manage" asp-action="Index" title="Manage"&gt;Hello @UserManager.GetUserName(User)!&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;
                  &lt;button type="submit" class="btn btn-link navbar-btn navbar-link"&gt;Log out&lt;/button&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/form&gt;
  }
  </code></pre>
  
  <p>And instead of <code>Hello @UserManager.GetUserName(User)!</code> I would like to say <code>Hello ???????.FirstName!</code></p>
  
  <p>I cannot find a way to access those extra properties from the view. Any suggestions on how to do that?</p>
  
  <p>Thanks!</p>