Example #1
0
        static DBMiddleware()
        {
            using (Context = new CodeRunnerEntities(connection))
            {
                var adminUser = new User
                {
                    Id           = Guid.NewGuid(),
                    Email        = "*****@*****.**",
                    PasswordHash = Encoding.ASCII.GetBytes(BCrypt.Net.BCrypt.HashPassword("admin1", 12)),
                    Username     = "******"
                };

                Context.Users.Add(adminUser);
                Context.SaveChanges();
            }
        }