Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. public class BlogContext : DbContext
  2. {
  3. public DbSet<Post> Posts { get; set; }
  4. public DbSet<PostTagMap> PostTags { get; set; }
  5. public DbSet<Category> Categorys { get; set; }
  6. public DbSet<Tag> PostTags { get; set; }
  7. }
  8. public class Post
  9. {
  10. public int Id { get; set; }
  11. public string Title { get; set; }
  12. public string ShortDescription { get; set; }
  13. public string Meta { get; set; }
  14. public string UrlSlug { get; set; }
  15. public bool Published { get; set; }
  16. public DateTime PostedOn { get; set; }
  17. public DateTime? Modified { get; set; }
  18. public Category Category { get; set; }
  19. public IList<Tag> Tags { get; set; }
  20. }
  21. public class PostTagMap
  22. {
  23.  
  24. }
  25. public class Category
  26. {
  27. public int Id { get; set; }
  28. public string Name { get; set; }
  29. public string UrlSlug { get; set; }
  30. public string Description { get; set; }
  31. public IList<Post> Posts { get; set; }
  32. }
  33. public class Tag
  34. {
  35. public int Id { get; set; }
  36. public string Name { get; set; }
  37. public string UrlSlug { get; set; }
  38. public string Description { get; set; }
  39. public IList<Post> Posts { get; set; }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement