PropertyChanged Event of ObservableCollection
- by developer
Hi All,
I have a observable collection of viewmodel objects. How can I subscribe to the Property Changed event of each view model in my collection as they are created and track which ones have been changed, so that I can updated them to my database.
List<DomainObject> objectsToSave = new List<DomainObject>();
foreach (Test val in dirtyObjs)
{
objectsToSave.AddRange(val.GetObjectsToSave());
}
//DB changes
bool saveSucceeded = DataServices.SaveMultiple(objectsToSave);