Advertisement
Guest User

Untitled

a guest
May 15th, 2019
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. public class User
  2. {
  3. [Key]
  4. public int UserID { get; set; }
  5. [Display(Name = "Nazwa uzytkowinika")]
  6. [Required(ErrorMessage = "Nazwa użytkownika jest wymagana ")]
  7.  
  8. public string UserName { get; set; }
  9. [Display(Name = "Hasło")]
  10. [DataType(DataType.Password)]
  11. [Required(ErrorMessage = "Password is required ")]
  12. public string Password { get; set; }
  13.  
  14. public bool isAdmin
  15. {
  16. get; set;
  17. }
  18.  
  19.  
  20. [DataType(DataType.Password)]
  21. [Display(Name = "Potwierdzenie hasła")]
  22. [Required(ErrorMessage = "Potwierdzenie hasła jest wymagane")]
  23. [Compare("Password", ErrorMessage = "Hasło nie pasuje ")]
  24. public string ConfirmPassword { get; set; }
  25.  
  26.  
  27.  
  28.  
  29.  
  30. public User()
  31. {
  32. }
  33.  
  34. public User(string username, string password)
  35. {
  36. this.UserName = username;
  37. this.Password = password;
  38.  
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement