Esempio n. 1
0
 public void AddUser(string username, string password)
 {
     string salt = PasswordHelper.GenerateRandomSalt();
     string hash = PasswordHelper.HashPassword(password, salt);
     User user = new User
     {
         UserName = username,
         PasswordSalt = salt,
         PasswordHash = hash,
     };
     using(var context = new ECommerceDbDataContext(_connectionString))
     {
         context.Users.InsertOnSubmit(user);
         context.SubmitChanges();
     }
 }
Esempio n. 2
0
 partial void DeleteUser(User instance);
Esempio n. 3
0
 partial void UpdateUser(User instance);
Esempio n. 4
0
 partial void InsertUser(User instance);