public void Delete() { if (!_newObject) { _businessObject.Remove(); } }
/// <summary> /// Removes the item from the index. /// </summary> public void RemoveFromIndex(object item, int itemKey) { if (item == null) { throw new ArgumentNullException(nameof(item)); } int indexKey = GetIndexKey(item); if (ItemGroups.TryGetValue(indexKey, out SortedDictionary <int, object> group)) { group.Remove(itemKey); if (group.Count == 0) { ItemGroups.Remove(indexKey); } } }