private void Experiments_RemovingItem(object sender, RemoveItemEventArgs <ExperimentModel> e) { var plates = this.Plates.Where(p => e.RemovedItem.Id == p.Experiment?.Id); if (plates != null) { foreach (var plate in plates) { plate.Experiment = null; } } }
protected virtual void OnRemovingItem(RemoveItemEventArgs <ExperimentModel> args) { RemovingItem?.Invoke(this, args); }