Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. public class User : IdentityUser
  2. {
  3. public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<User> manager)
  4. {
  5. // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
  6. var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
  7. // Add custom user claims here
  8. return userIdentity;
  9. }
  10.  
  11. public User()
  12. {
  13. Calendar = new Calendar();
  14. }
  15.  
  16. public Calendar Calendar { get; private set; }
  17. }
  18.  
  19. public class Calendar
  20. {
  21. public int Id { get; set; }
  22.  
  23. public Calendar()
  24. {
  25. CalendarEvents = new List<CalendarEvent>();
  26. }
  27.  
  28. public virtual List<CalendarEvent> CalendarEvents { get; private set; }
  29. }
  30.  
  31. public class CalendarEvent
  32. {
  33. public int Id { get; set; }
  34. public string title { get; set; }
  35. public string date { get; set; }
  36. public string start { get; set; }
  37. public string end { get; set; }
  38. public string url { get; set; }
  39. public bool allDay { get; set; }
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement