public AccountController(UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, SignInManager <ApplicationUser> signInManager, ILogger <AccountController> logger, HospitalDbContext context) { _userManager = userManager; _signInManager = signInManager; _logger = logger; _context = context; UsersSeedData.EnsurePopulatedAsync(userManager, roleManager).Wait(); }
public AccountController( UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, SignInManager <ApplicationUser> signInManager, IEmailSender emailSender, ILogger <AccountController> logger) { _userManager = userManager; _signInManager = signInManager; _emailSender = emailSender; _logger = logger; UsersSeedData.EnsurePopulatedAsync(userManager, roleManager).Wait(); }
public AccountController( UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, // adicionado SignInManager <ApplicationUser> signInManager, IEmailSender emailSender, ILogger <AccountController> logger) { _userManager = userManager; _signInManager = signInManager; _emailSender = emailSender; _logger = logger; // 6. (b.d.AUTENTICAÇÃO) UsersSeedData.EnsurePopulatedAsync(userManager, roleManager).Wait(); // ver /Models/AccountViewModels/loginViewModel }
public AccountController( UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, SignInManager <ApplicationUser> signInManager, IOptions <IdentityCookieOptions> identityCookieOptions, IEmailSender emailSender, ISmsSender smsSender, ILoggerFactory loggerFactory, TrabalhoDbContext context) { _userManager = userManager; _signInManager = signInManager; _externalCookieScheme = identityCookieOptions.Value.ExternalCookieAuthenticationScheme; _emailSender = emailSender; _smsSender = smsSender; _logger = loggerFactory.CreateLogger <AccountController>(); _context = context; UsersSeedData.EnsurePopulatedAsync(userManager, roleManager).Wait(); }