コード例 #1
0
 // 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;
 }
コード例 #2
0
        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;
        }
コード例 #3
0
 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;
 }
コード例 #4
0
 public ReviewsController(AngelicBeatsDbContext context, UserManager <ApplicationUser> userManager)
 {
     _context     = context;
     _userManager = userManager;
 }