public ProductBase(int id, string title, decimal price, CategoryBase category) { if (id <= 0 || price < 0) { throw new ArgumentException(); } Id = id; Price = price; Title = title.ThrowIfNull(nameof(title)); Category = category.ThrowIfNull(nameof(category)); }
public CampaignBase(int id, string title, decimal discount, CategoryBase category) { if (id <= 0 || discount < 0) { throw new ArgumentException(); } Id = id; Discount = discount; Title = title.ThrowIfNull(nameof(title)); Category = category.ThrowIfNull(nameof(category)); }
public CampaignDiscountByAmount(int id, string title, decimal discount, CategoryBase category, decimal trasholdCount) : base(id, title, discount, category) { TrasholdCount = trasholdCount; }
public FirstProduct(int id, string title, decimal price, CategoryBase category) : base(id, title, price, category) { }