Ticket T154290
Visible to All Users

XPO Action Logging

created 10 years ago

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.

Comments (3)
Anatol (DevExpress) 10 years ago

    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.

    DevExpress Support Team 10 years ago

      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?

      MV MV
      Milan Vicentijevic 10 years ago

        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.

        Answers approved by DevExpress Support

        created 10 years ago

        Hi Milan,
        ViewModelBase doesn't provide a special functionality to log user actions. I suggest that you perform logging in the ICommand.Execute method of each command.

        Thanks,
        Alexander

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.