Guest User

Untitled

a guest
Dec 12th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. public class ApplicationUser : IdentityUser
  2. {
  3. public Person PersonInfo { get; set; }
  4.  
  5. public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager)
  6. {
  7. // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
  8. var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
  9. // Add custom user claims here
  10. return userIdentity;
  11. }
  12. }
  13.  
  14. public class Person
  15. {
  16. public int Id { get; set; }
  17.  
  18. [MaxLength(128)]
  19. [Required]
  20. public string AspNetUserID { get; set; }
  21.  
  22. [MaxLength(25)]
  23. public string FirstName { get; set; }
  24.  
  25. [MaxLength(25)]
  26. public string LastName { get; set; }
  27.  
  28. public string Company { get; set; }
  29.  
  30. public string OfficePhone { get; set; }
  31. public string CellPhone { get; set; }
  32. public DateTime? EffectiveDate { get; set; }
  33. public DateTime? TerminationDate { get; set; }
  34.  
  35. [MaxLength(50)]
  36. public string Address1 { get; set; }
  37.  
  38. [MaxLength(50)]
  39. public string Address2 { get; set; }
  40.  
  41. [MaxLength(25)]
  42. public string City { get; set; }
  43.  
  44. [MaxLength(2)]
  45. public string State { get; set; }
  46.  
  47. [MaxLength(10)]
  48. public string Zip { get; set; }
  49.  
  50. [MaxLength(1)]
  51. public string Status { get; set; }
  52.  
  53. public ICollection<ApplicationUser> AspNetUsers { get; set; }
  54. }
Add Comment
Please, Sign In to add comment