Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. public class Company
  2. {
  3. [Key]
  4. public int id { get; set; }
  5. public string name { get; set; }
  6. public string sys_id { get; set; }
  7. }
  8.  
  9. public class Ticket
  10. {
  11. [Key]
  12. public int id { get; set; }
  13. public string company_id { get; set; }
  14. public string short_desc { get; set; }
  15. }
  16.  
  17. public class Company
  18. {
  19. [Key]
  20. public int id { get; set; }
  21. public string name { get; set; }
  22. public string sys_id { get; set; }
  23.  
  24. [InverseProperty("company_id")]
  25. [ForeignKey("sys_id")]
  26. public virtual ICollection<Ticket> Tickets { get; set; }
  27. }
  28.  
  29. public class Ticket
  30. {
  31. [Key]
  32. public int id { get; set; }
  33. public string company_id { get; set; }
  34. public string short_desc { get; set; }
  35.  
  36. public virtual Company Company { get; set; }
  37. }
  38.  
  39. public class Company
  40. {
  41. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  42. public int id { get; set; }
  43.  
  44. public string name { get; set; }
  45.  
  46. [Key, StringLength(128)]
  47. public string sys_id { get; set; }
  48. }
  49.  
  50. public class Ticket
  51. {
  52. public int id { get; set; }
  53.  
  54. public string short_desc { get; set; }
  55.  
  56. public string company_id { get; set; }
  57. [ForeignKey("company_id"), StringLength(128)]
  58. public virtual Company Company { get; set; }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement