コード例 #1
0
 public virtual void RemoveDetailEntities()
 {
     if (!SelectedEntities.Any())
     {
         return;
     }
     foreach (var selectedEntity in SelectedEntities)
     {
         DetailEntities.Remove(selectedEntity);
     }
     SaveChangesAndNotify(SelectedEntities);
     SelectedEntities.Clear();
 }
        public virtual void RemoveDetailEntities()
        {
            if (!SelectedEntities.Any())
            {
                return;
            }
            var entities = SelectedEntities.ToList();

            foreach (var e in entities)
            {
                SelectedEntities.Remove(e);
                DetailEntities.Remove(e);
            }
            SaveChangesAndNotify(entities);
            this.RaiseCanExecuteChanged(x => x.RemoveDetailEntities());
        }