Esempio n. 1
0
 public ProductAggregation(long id, IProductDetailValue detail, IProductPromotionValue promotion, IProductCategoryEntity productCategory, float discount, int quantity, bool favorite)
 {
     Id             = id;
     this.detail    = detail ?? ProductDetailValue.Empty;
     this.promotion = promotion ?? ProductPromotionValue.Empty;
     Category       = productCategory ?? ProductCategoryEntity.Empty;
     Discount       = discount;
     Quantity       = quantity;
     IsFavorite     = favorite;
 }
 public IProductAggregation NewProduct(long id, IProductDetailValue detail, IProductPromotionValue promotion, IProductCategoryEntity productCategory, float discount, int quantity, bool favorite)
 {
     return(new ProductAggregation(id, detail, promotion, productCategory, discount, quantity, favorite));
 }