示例#1
0
        public Order Remove(Product addition)
        {
            var orderAddition = Additions.FirstOrDefault(a => a.Product == addition);

            if (orderAddition == null)
            {
                return(this);
            }
            Price -= orderAddition.Product.Price;
            Container.DisposeInstance(orderAddition);
            Additions.Remove(orderAddition);

            return(this);
        }
示例#2
0
 /*
  * Usuwa dodatek i aktualizuje cene
  * @param {Addition} add - Dodatek do dania
  * @return void;
  */
 public void Remove(Addition add)
 {
     Additions.Remove(add);
     Price -= add.Price;
 }