0
|
1 using System;
|
|
2
|
|
3 using BLToolkit.Common;
|
|
4 using BLToolkit.DataAccess;
|
|
5 using BLToolkit.Mapping;
|
|
6
|
|
7 namespace PetShop.ObjectModel
|
|
8 {
|
|
9 [Serializable]
|
|
10 [TableName("LineItem")]
|
|
11 public class OrderLineItem : EntityBase
|
|
12 {
|
|
13 [MapField("OrderId"), PrimaryKey(1)] public int OrderID;
|
|
14 [MapField("LineNum"), PrimaryKey(2)] public int Line;
|
|
15
|
|
16 [MapField("ItemId")] public string ItemID;
|
|
17 public int Quantity;
|
|
18 [MapField("UnitPrice")] public decimal Price;
|
|
19
|
|
20 [MapIgnore] public decimal Subtotal { get { return Quantity * Price; } }
|
|
21 }
|
|
22 }
|