public void RemoveItem(string clientID) { SearchSessionItem item = Items.FirstOrDefault(a => a.ClientID == clientID); if (item != null) { Items.Remove(item); } }
public void Add(string clientID, string value, string property, ValidationDataType dataType, string customWhere) { SearchSessionItem item = Items.FirstOrDefault(a => a.ClientID == clientID); if (item != null) { item.Value = value; item.PropertyName = property; item.DataType = dataType; item.CustomWhere = customWhere; } else { Items.Add(new SearchSessionItem(clientID, value, property, dataType, customWhere)); } }