在淘宝购物?在宿舍宅着?趁着周末约会?还是干嘛呢?
元芳,你怎么看?
System.out.println("123");
2.partial class Order : IAggregateRoot
3.{
4. public Single TotalDiscount
5. {
6. get
7. {
8. return this.Lines.Sum(p => p.Discount);
9. }
10. }
11.
12. public Single TotalAmount
13. {
14. get
15. {
16. return this.Lines.Sum(p => p.LineAmount);
17. }
18. }
19.
20.}
[AggregateRoot("Orders")]
partial class Order : IAggregateRoot
{
public Single TotalDiscount
{
get
{
return this.Lines.Sum(p => p.Discount);
}
}
public Single TotalAmount
{
get
{
return this.Lines.Sum(p => p.LineAmount);
}
}
}

