Beispiel #1
0
        public void CreateUlearnBotUserIfNotExists()
        {
            if (!db.Users.Any(u => u.UserName == UlearnBotUsername))
            {
                var user = new ApplicationUser
                {
                    UserName  = UlearnBotUsername,
                    FirstName = "Ulearn",
                    LastName  = "bot",
                    Email     = "*****@*****.**",
                };
                var userManager = new ULearnUserManager(db);
                userManager.Create(user, StringUtils.GenerateSecureAlphanumericString(10));

                db.SaveChanges();
            }
        }
Beispiel #2
0
 public XQueueRepo(ULearnDb db, CourseManager courseManager)
 {
     this.db           = db;
     userManager       = new ULearnUserManager(db);
     userSolutionsRepo = new UserSolutionsRepo(db, courseManager);
 }
Beispiel #3
0
 public UserRolesRepo()
     : this(new ULearnDb())
 {
     userManager = new ULearnUserManager(db);
 }
Beispiel #4
0
 public GradersRepo(ULearnDb db)
 {
     this.db     = db;
     userManager = new ULearnUserManager(db);
 }