// add the db context and user manager through dependency injection public UserRolesController( AngelicBeatsDbContext context, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager) { _dataContext = context; _userManager = userManager; _roleManager = roleManager; }
public SongsController(AngelicBeatsDbContext context, UserManager <ApplicationUser> userManager) { if (context == null) { throw new Exception("Null database context supplied."); } if (userManager == null) { throw new Exception("Null user manager supplied."); } _context = context; _userManager = userManager; }
public AccountController( AngelicBeatsDbContext dataContext, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, SignInManager <ApplicationUser> signInManager, IEmailSender emailSender, ILogger <AccountController> logger ) { _dataContext = dataContext; _userManager = userManager; _roleManager = roleManager; _signInManager = signInManager; _emailSender = emailSender; _logger = logger; }
public ReviewsController(AngelicBeatsDbContext context, UserManager <ApplicationUser> userManager) { _context = context; _userManager = userManager; }