public void AddOdd(Betting betting, int quantity) { CardLine line = lineCollection.Where(b => b.Betting == betting) .FirstOrDefault(); if (line == null) { lineCollection.Add( new CardLine { Betting = betting, Quantity = quantity }); } else { line.Quantity += quantity; } }
public void RemoveOdd(Betting betting) { lineCollection.RemoveAll(b => b.Betting == betting); }