public void RemoveGoodsSet(GoodsSet set) { if (!goodsSets.Contains(set)) { throw new ArgumentException($"Goods with name {set.Goods.Name} not found"); } goodsSets.Remove(set); CacheGoodsSets(); }
public void AddGoodsSet(GoodsSet set) { if (HasGoods(set.Goods)) { throw new ArgumentException($"{set.Goods.Name} already in cart"); } goodsSets.Add(set); CacheGoodsSets(); }