question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simple Tracking Changes

See original GitHub issue

I have a question about it if is possible to track like only Date and User Created/Modified for example, inside classes… Not creating a full history change… example:

public abstract class AuditEntity {
    public DateTime? CreatedDate { get; set; }
    public DateTime? ModifiedDate { get; set; }  
    public string? CreatedBy { get; set; }
    public string? ModifiedBy { get; set; }
}

public class SimpleTrackEntity : AuditEntity {
    public string? Description { get; set; }
}

I did not find something related if this is possible to do using this Audit.NET

My use case is: I should create a Trail Table, which I am using this Audit.NET to do it, but do want to set Date and User Created/Modified for some entities, so this way it is easy to get.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
EliveltonRepolhocommented, Apr 23, 2022

thanks for the recommendation too, I’ve implemented and now everything looks good.

Closing this issue … will leave this example available if might be useful for someone else.

Thanks a lot for helping with it !

1reaction
thepirat000commented, Apr 22, 2022

Also, the recommendation is to set up a different instance of your DbContext for the audit entities by calling .UseDbContext()

Audit.Core.Configuration.Setup()
    .UseEntityFramework(ef => ef
        .UseDbContext<AppDbContext>() 
        ...);

Check this https://github.com/thepirat000/Audit.NET/issues/168#issuecomment-425609685

Read more comments on GitHub >

github_iconTop Results From Across the Web

Track changes in Word
Simple Markup displays tracked changes with a red line in the margin. All Markup displays tracked changes with different colors of text and...
Read more >
Word: Track Changes and Comments
From the Review tab, click the Track Changes command. ... Track Changes will be turned on. From this point on, any changes you...
Read more >
How to Use Track Changes and Comments in Microsoft ...
This tutorial shows how to use Track Changes in Microsoft Word, including insertions, deletions, format changes, and comments.
Read more >
How to Use Track Changes in Microsoft Word
To turn Track Changes on, click on the "Review" tab, then click on the icon above "Track Changes." To turn Track Changes off,...
Read more >
How to Track Changes in Microsoft Word - YouTube
In this quick Microsoft Word tutorial video, learn how to track changes in Word. To see the full blog article that this video...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found