Is there a way for me to log Model or View-Model actions through XPO without fully implementing my own mechanism.
For example, I'd like to to log changes (creation, deletion, updates) of a Person persistent object , but I'd also like to log ViewModel commands that activated those changes. I don't want to track specific sql queries.
What's the best way of doing that within devexpress platform? I'm using dx MVVM library, dx WPF controls and XPO.
Regards.
As I can see, your task consists of two parts - logging ViewModel commands and logging changes of persistent objects. I have created a separate ticket for the persistent object part: How to log operations with persistent objects.
We will answer the MVVM-specific part in the current ticket.
Hi Milan,
It is difficult to provide you with an exact solution without additional information regarding your scenario. Would you please clarify how your ViewModel is organized? What do you mean by logging the ViewModel's commands?
In a simple scenario, I have a specialized ViewModel class derived from DevExpress.Mvvm.ViewModelBase.
I want to log all user action (DelegateCommands, or any implementation of an ICommand interface) informations.
ie, when a user clicks Save button I want to log User information coupled with ViewModel command referenced (SaveCommand in this case) and changes (if there are any) applied to persistent objects.
Basically, I'm trying to store user actions on a database server.