public bool Equals(StockGroup other) { if (other == null) { return(false); } return(this.Id == other.Id); }
public StockGroup CreateOrGet(StockGroup stockGroup) { if (stockGroup == null) { throw new ArgumentNullException(); } if (!_stockGroups.Contains(stockGroup)) { _stockGroups.Add(stockGroup); } return(stockGroup); }