private void FixItemList() { // Somehow item list got messed up and items are not unique anymore var duplicates = ObservableItems.GroupBy(x => x.ItemId).Where(g => g.Count() > 1) .Select(y => y); foreach (var duplicateGroup in duplicates) { var duplicate = duplicateGroup.First(); ObservableItems.Remove(duplicate); } }
public virtual void RemoveItem(WriteoffItem item) { ObservableItems.Remove(item); }