public static RoleManager <AppRole, int> CreateRole() { var dbContext = new QuizzerDbContext(); var rolestore = new RoleStore <AppRole, int, AppUserRole>(dbContext); var rolemanager = new RoleManager <AppRole, int>(rolestore); // allow alphanumeric characters in username return(rolemanager); }
public static UserManager <AppUser, int> CreateUser() { var dbContext = new QuizzerDbContext(); var store = new UserStore <AppUser, AppRole, int, AppUserLogin, AppUserRole, AppUserClaim>(dbContext); var usermanager = new UserManager <AppUser, int>(store); // allow alphanumeric characters in username usermanager.UserValidator = new UserValidator <AppUser, int>(usermanager) { AllowOnlyAlphanumericUserNames = false, RequireUniqueEmail = false, }; usermanager.PasswordValidator = new PasswordValidator() { RequiredLength = 4, RequireDigit = false, RequireUppercase = false }; return(usermanager); }
public Repository(QuizzerDbContext _ctxt) { _dbContext = _ctxt; }
public CategoryRepository(QuizzerDbContext ctxt) : base(ctxt) { }
public QuestionRepository(QuizzerDbContext ctxt) : base(ctxt) { _ctxt = ctxt; }
public OptionRepository(QuizzerDbContext ctxt) : base(ctxt) { }