public void AddorUpdate(CanItem can) { var found = _stock.GetAll().FirstOrDefault(item => item.Flavour.ToLower() == can.Flavour.ToLower()); if (found == null) { _stock.Add(can); } else { _stock.Update(can); } }
public void Remove(CanItem can) { Cans.RemoveAll(item => item.Flavour == can.Flavour); }
public void Update(CanItem can) { Remove(can); Add(can); }
public void Add(CanItem can) { Cans.Add(can); }