Base solution for your next web application
Open Closed

Display entity changes #9900


User avatar
0
ignasiclos created

We need to display the entity change log in our platform,that is, who has changed what and when, I know that this information is stored, but what's the best way to retrieve it? Thanks


8 Answer(s)
  • User Avatar
    0
    musa.demir created

    When you enable entity history you can see all changes in auditlog page. Go to https://localhost:44302/AppAreaName/AuditLogs and open change logs page. You can also see the details of the changes.

  • User Avatar
    0
    ignasiclos created

    The think is that I want to get the data to incorporate it to our own pages

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ignasiclos

    You can use AuditLogAppService's GetEntityChanges method as an API and retrieve the data you want. Follow https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Features-Angular-Token-Based-Authentication to authenticate your external app and get data from AspNet Zero.

    You can also directly access to database but using the API is better I think.

  • User Avatar
    0
    ignasiclos created

    It looks like I cannot get the changes of a single entity, right? I cannot see any method to get the history by entity Id and tyoe

    What I whant to achieve is to show in a entity detail page, the changes of it

    Thanks

  • User Avatar
    0
    ignasiclos created

    Sorry, I missed it, GetEntityTypeChangeInput, testing now.

  • User Avatar
    0
    ignasiclos created

    Getting operation logs but no change log, Perhaps I should activate it somewhere?

  • User Avatar
    0
    ismcagdas created
    Support Team
  • User Avatar
    0
    ignasiclos created

    Great, thanks!