Unable to get IdentityUser data from ASP.NET Core 2.1 controller

asp.net-core c# entity-framework-core identity

Accepted Answer

If you want to employ customizedApplicationUser your Identity as opposed to the defaultIdentityUser After defining the model, several adjustments must be made.

1.In the dbContext

public class ApplicationDbContext : IdentityDbContext<ApplicationUser>

startup.cs, line 2

services.AddIdentity<ApplicationUser,IdentityRole>(config => {
        config.SignIn.RequireConfirmedEmail = true;
    })
...

3. /Shared/ LoginPartial.cshtml in your browser

@inject SignInManager<ApplicationUser> SignInManager
@inject UserManager<ApplicationUser> UserManager
5
12/18/2018 2:49:34 AM

Popular Answer

ZZZ_tmp


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow