Advertisement
AleYalunin

Untitled

Nov 22nd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. namespace VTClassLibrary
  2. {
  3. public class Product
  4. {
  5. [Key]
  6. [StringLength(4)]
  7. public string ProductCode { get; set; }
  8. public string ProductName { get; set; }
  9. public int ProductSellingPrice { get; set; }
  10. public int ProductPurchasePrice { get; set; }
  11.  
  12. public virtual ICollection<ProductVendingTerminal> ProductVendingTerminals { get; set; }
  13. }
  14. }
  15.  
  16.  
  17.  
  18. namespace VTClassLibrary
  19. {
  20. public class VendingTerminal
  21. {
  22. [Key]
  23. public int VTId { get; set; }
  24. public string VTLocation { get; set; }
  25. public int VTCredit { get; set; }
  26.  
  27. public virtual Cash Cash { get; set; }
  28. public virtual ICollection<ProductVendingTerminal> ProductVendingTerminals { get; set; }
  29. }
  30. }
  31.  
  32.  
  33.  
  34. namespace VTClassLibrary
  35. {
  36. public class ProductVendingTerminal
  37. {
  38. [Key, Column(Order = 0)]
  39. public string ProductCode { get; set; }
  40. [Key, Column(Order = 1)]
  41. public int VTId { get; set; }
  42.  
  43. public virtual Product Product { get; set; }
  44. public virtual VendingTerminal VendingTerminal { get; set; }
  45.  
  46. public int Amount { get; set; }
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement