public override int GetHashCode() { if (ShelfNo != null) { return ShelfNo.GetHashCode(); } else { return base.GetHashCode(); } }