public virtual void DeleteTradedStock(Stock stock) { if (StocksTraded.Contains(stock) && stock.MarketsTradedOn.Contains(this)) { stock.MarketsTradedOn.Remove(this); StocksTraded.Remove(stock); } }
public virtual void AddTradedStock(Stock stock) { if (!StocksTraded.Contains(stock) && !stock.MarketsTradedOn.Contains(this)) { stock.MarketsTradedOn.Add(this); StocksTraded.Add(stock); } }