private void DataSource_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { switch (e.Action) { case NotifyCollectionChangedAction.Add: foreach (Users item in e.NewItems) { BL_Users.Save(item); } break; case NotifyCollectionChangedAction.Remove: foreach (Users item in e.OldItems) { BL_Users.Delete(item); } break; } }