Reputation: 1163
In my app, the BackgroundWorker (housekeeping task) checks for data to be deleted from the database. After the data has been deleted do I then remove that DataItem from the ViewModel or the Model?
(Yes, I'm new to MVVM and perhaps I don't understand it too well yet).
Thanks.
Upvotes: 1
Views: 177
Reputation: 21108
I'm not sure exactly what you're trying to accomplish, but I would caution about the Background Worker modifying the viewmodel as part it's DoWork method. Modifying the ViewModel suggests a change to the UI, which likely won't work since the DoWork method is not running on the UI thread.
Upvotes: 1
Reputation: 172468
It depends on how your model and your view model are implemented, but conceptually, I'd
Upvotes: 0