Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. public class BaseModel
  2. {
  3. public BaseModel()
  4. {
  5. IsActive = true;
  6. }
  7.  
  8. public int Id { get; set; }
  9.  
  10. public bool IsActive { get; set; }
  11.  
  12. public DateTime CreatedDate { get; set; }
  13.  
  14. public string CreatedUser { get; set; }
  15.  
  16. public DateTime UpdatedDate { get; set; }
  17.  
  18. public string UpdatedUser { get; set; }
  19. }
  20.  
  21. public class Category : BaseModel
  22. {
  23. public string Name { get; set; }
  24. }
  25.  
  26. public class Book : BaseModel
  27. {
  28. public string Title { get; set; }
  29.  
  30. public int CategoryId { get; set; }
  31.  
  32. public virtual Category Category { get; set; }
  33.  
  34. public virtual ICollection<Person> Authors { get; set; }
  35. }
  36.  
  37. public class Person : BaseModel
  38. {
  39. public string FirstName { get; set; }
  40.  
  41. public string LastName { get; set; }
  42.  
  43. public virtual ICollection<Book> Books { get; set; }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement