using System.Threading.Tasks; using HanyadikHetVan.Data.Entities; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.Logging; namespace HanyadikHetVan.Areas.Identity.Pages.Account.Manage { public class PersonalDataModel : PageModel { private readonly UserManager _userManager; private readonly ILogger _logger; public PersonalDataModel( UserManager userManager, ILogger logger) { _userManager = userManager; _logger = logger; } public async Task OnGet() { var user = await _userManager.GetUserAsync(User); if (user == null) { return NotFound($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); } return Page(); } } }