I have a question about MVVM design, and where I should put some code that I would like to add.
My application queries active directory for computers and displays the list to the user. Selecting a computer displays some general Active Directory and WMI information about that specific computer.
Currently, I have a “MainWindowViewModel” for the application main window. Each Computer gets its own “ComputerViewModel”. ComputerViewModels communicate with a DataService, which in turn uses the ActiveDirectory and WMI repositories to get the information.
I would like to indicate whether or not the machine is “up” by pinging it. Is it considered OK MVVM practice to put the pinging code in the ComputerViewModel, or should I put that somewhere else?