示例#1
0
 public HomeController(
     UserManager <IdentityUser> user, SchoolUserRepository schoolUserRepository,
     SchoolUserCategoryRepository schoolUserCategoryRepository, ClassGroupRepository classGroupRepository)
 {
     _user = user;
     _schoolUserRepository         = schoolUserRepository;
     _schoolUserCategoryRepository = schoolUserCategoryRepository;
     _classGroupRepository         = classGroupRepository;
 }
        public RegisterModel(
            UserManager <IdentityUser> userManager,
            SignInManager <IdentityUser> signInManager,
            ILogger <RegisterModel> logger,
            IEmailSender emailSender,
            SchoolUserController schoolUserController,
            ClassGroupRepository classGroupRepository,
            SchoolUserCategoryRepository schoolUserCategoryRepository)
        {
            _userManager                  = userManager;
            _signInManager                = signInManager;
            _logger                       = logger;
            _emailSender                  = emailSender;
            _schoolUserController         = schoolUserController;
            _classGroupRepository         = classGroupRepository;
            _schoolUserCategoryRepository = schoolUserCategoryRepository;

            ClassGroupOptions         = new SelectList(_classGroupRepository.GetAll(), nameof(ClassGroup.Id), nameof(ClassGroup.ClassGroupName));
            SchoolUserCategoryOptions = new SelectList(_schoolUserCategoryRepository.GetAll(), nameof(SchoolUserCategory.Id), nameof(SchoolUserCategory.Category));
        }