I am trying to get the value of the login user from the column IsAuthorised . but when I debug the values is stored in var user but when I try to store the value of isauthorised column it is not working
public class ForcastController : Controller { private readonly IWeatherRepository _weatherRepository; private readonly IUnitOfWork _unitOfWork; private readonly UserManager<IdentityUser> _userManager; public Weather Weather { get; set; } public ForcastController(IWeatherRepository weatherRepository, IUnitOfWork unitOfWork, UserManager<IdentityUser> userManager) { _weatherRepository = weatherRepository; _unitOfWork = unitOfWork; _userManager = userManager; } public async Task<IActionResult> Index() { // ApplicationUser applicationUser = await _userManager.GetUserAsync(User); var user = await _userManager.GetUserAsync(User); // The value is stored here while running
//I cannot get the value from the variable user
bool isAuth = user.IsAuthorised // IsAuthorised property is not showing . But when I run the value is stored on the variable user
public class ApplicationUser : IdentityUser { [Required] public string Name { get; set; } public string StreetAddress { get; set; } public string City { get; set; } public string State { get; set; } public string PostalCode { get; set; } public bool IsAuthorised { get; set; } }