I have an issue that I assumed would be a simple fix, but has turned into a big problem.
On my _Layout.cshtml
page, I just want to display the current user's first and last name. This is stored in the AspNetUsers
database table in the Name
column. I currently have this on the layout page:
<h5>@Context.User.Identity.Name</h5>
This just displays the Username for that user, and Name
is the only property available. Is there a way to overload the Identity to expose the user's full name?
This wouldn't be a big issue if it was only on one page, then I could just load that user data in the controller, but it needs to be shared across all pages in the layout.