Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Company
- {
- [Key]
- public int id { get; set; }
- public string name { get; set; }
- public string sys_id { get; set; }
- }
- public class Ticket
- {
- [Key]
- public int id { get; set; }
- public string company_id { get; set; }
- public string short_desc { get; set; }
- }
- public class Company
- {
- [Key]
- public int id { get; set; }
- public string name { get; set; }
- public string sys_id { get; set; }
- [InverseProperty("company_id")]
- [ForeignKey("sys_id")]
- public virtual ICollection<Ticket> Tickets { get; set; }
- }
- public class Ticket
- {
- [Key]
- public int id { get; set; }
- public string company_id { get; set; }
- public string short_desc { get; set; }
- public virtual Company Company { get; set; }
- }
- public class Company
- {
- [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public int id { get; set; }
- public string name { get; set; }
- [Key, StringLength(128)]
- public string sys_id { get; set; }
- }
- public class Ticket
- {
- public int id { get; set; }
- public string short_desc { get; set; }
- public string company_id { get; set; }
- [ForeignKey("company_id"), StringLength(128)]
- public virtual Company Company { get; set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement