Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. ID CODE VALUE
  2. 1. BusinessType IT
  3. 2. BusinessType Marketing
  4. 3. ContractType General
  5. 4. ContractType Custom
  6.  
  7. public class Contract
  8. {
  9. [Key]
  10. public int ID{get; set;}
  11. public string Name{get; set;}
  12.  
  13. [ForeignKey("CodeValue")]
  14. public int BusinessTypeID{get; set;}
  15.  
  16. [ForeignKey("CodeValue")]
  17. public int ContractTypeID{get; set;}
  18.  
  19. public virtual CodeValue CodeValue {get; set;}
  20. }
  21.  
  22. public class Contract
  23. {
  24. [Key]
  25. public int ID { get; set; }
  26. public string Name { get; set; }
  27.  
  28. [ForeignKey("BusinessType")]
  29. public int BusinessTypeID { get; set; }
  30.  
  31. [ForeignKey("ContractType")]
  32. public int ContractTypeID { get; set; }
  33.  
  34. public virtual CodeValue BusinessType { get; set; }
  35. public virtual CodeValue ContractType { get; set; }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement