Ejemplo n.º 1
0
        private void AddUsers()
        {
            var a = new List <User>();

            a.Add(new User
            {
                Username = "******"
            });
            a.Add(new User
            {
                Username = "******"
            });
            a.Add(new User
            {
                Username = "******"
            });
            a.Add(new User
            {
                Username = "******"
            });
            foreach (var i in a)
            {
                context.Users.Add(i);
            }
            context.SaveChanges();

            using (var db = new DBDataContext())
            {
                db.Users.Add(new User {
                    Username = "******"
                });
                db.SaveChanges();
            }
        }
Ejemplo n.º 2
0
 public QuizRepository()
 {
     context = new DBDataContext();
     Answers = new List <object>();
     //AddUsers();
 }
Ejemplo n.º 3
0
 public AuthRepository()
 {
     context = new DBDataContext();
 }