示例#1
0
 public User(string name, string email, string password)
 {
     if (string.IsNullOrWhiteSpace(name))
     {
         throw new ArgumentNullException("Nome nao enviado");
     }
     if (string.IsNullOrWhiteSpace(email))
     {
         throw new ArgumentNullException("Email nao enviado");
     }
     if (string.IsNullOrWhiteSpace(password))
     {
         throw new ArgumentNullException("Senha nao enviada");
     }
     PasswordSalt = Membership.GenerateSalt();
     Password     = Membership.EncodePassword(password, PasswordSalt);
     Name         = name;
     Email        = email;
 }