1: public partial class OrderDetailBusinessKey
2: { 3: private System.Int32 _orderDetailID;
4:
5: // Business key constructor
6: public OrderDetailBusinessKey(System.Int32 orderDetailID)
7: { 8: _orderDetailID = orderDetailID;
9: }
10: public OrderDetailBusinessKey(){} 11:
12: public System.Int32 OrderDetailID
13: { 14: get {return _orderDetailID;} 15: set {_orderDetailID = value; } 16: }
17: }
18:
19: [Serializable]
20: public partial class OrderDetail
21: : OrderDetailBusinessKey
22: { 23: #region Private Variables
24: private OrderBusinessKey _order;
25: private ProductBusinessKey _product;
26: private System.Int32 _quantity;
27: private System.Decimal _price;
28: private System.Decimal _total;
29: // Variables for relationships
30: #endregion
31:
32: #region Constructors
33: public OrderDetail()
34: { 35: this.Initialize();
36: }
37:
38: /// <summary>
39: /// This code initializes the domain value types for the generated properties
40: /// </summary>
41: protected virtual void Initialize()
42: { 43: _order = new bl.OrderBusinessKey();
44: _product = new bl.ProductBusinessKey();
45:
46: // Call the Initialize routine in the partial class
47: this.ExtendedInitialize();
48: }
49: #endregion
50:
51: #region Public Properties
52:
53:
54: public OrderBusinessKey Order
55: { 56: get { return _order; } 57: set { _order = value; } 58: }
59:
60: public ProductBusinessKey Product
61: { 62: get { return _product; } 63: set { _product = value; } 64: }
65:
66: public System.Int32 Quantity
67: { 68: get { return _quantity; } 69: set { _quantity = value; } 70: }
71:
72: public System.Decimal Price
73: { 74: get { return _price; } 75: set { _price = value; } 76: }
77:
78: public System.Decimal Total
79: { 80: get { return _total; } 81: set { _total = value; } 82: }
83: #endregion
84: }
85:
86: public partial class ProductBusinessKey
87: { 88: private System.String _productName;
89:
90: // Business key constructor
91: public ProductBusinessKey(System.String productName)
92: { 93: _productName = productName;
94: }
95: public ProductBusinessKey(){} 96:
97: public System.String ProductName
98: { 99: get {return _productName;} 100: set {_productName = value; } 101: }
102: }