I have a log db table that I'd like to display in a GridView. I already have a view model that polls the db and updates the whole ObservableCollection if the table has changed. I do nothing else with this data, so I thought a further back model would be unnecessary.
However, now I'm starting to think it's improper that the viewmodel does any work with anything but the view and the model, and that I should introduce a model to observe the database and provide the viewmodel with any changes. The updated ObservableCollection in the view model then communicates the new data to the DataGrid in the view.
Aucun commentaire:
Enregistrer un commentaire