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); }
/* * Usuwa dodatek i aktualizuje cene * @param {Addition} add - Dodatek do dania * @return void; */ public void Remove(Addition add) { Additions.Remove(add); Price -= add.Price; }