Guest User

Untitled

a guest
Jan 21st, 2019
89
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 Favorite
  2. {
  3. [key]
  4. public int FavoriteId {get; set;}
  5.  
  6. public int? BikeId {get; set;}
  7. public virtual Bike Bike {get;set;}
  8.  
  9. public int? HelmetId {get;set;}
  10. public virtual Helmet Helmet {get;set;}
  11.  
  12. public int? ShoeId {get;set;}
  13. public virtual Shoe Shoe{get;set;}
  14.  
  15. public int UserId {get;set;}
  16. public virtual User User {get;set;}
  17. }
  18.  
  19. public class Bike
  20. {
  21. public int BikeId {get;set;}
  22. ...
  23. public virtual list<Favorties> Favorites {get;set;}
  24. }
  25.  
  26. Favorites:
  27. | Id | BikeId | HelmetId | ShoeId | UserId |
  28. | 1 | 5 | | | snowburnt |
  29. | 2 | 6 | | | jonh |
  30. | 3 | | 2 | | snowburnt |
  31.  
  32. Favorites:
  33. | ID | Differentiator | foreignKeyId | UserId |
  34. | 1 | Bike | 5 | snowburnt |
  35. | 2 | Bike | 6 | john |
  36. | 3 | Helmet | 2 | snowburnt |
Add Comment
Please, Sign In to add comment