Avoid duplication and model shift when using Audit.net #767
Unanswered
ektasinha-neuroflow
asked this question in
Q&A
Replies: 1 comment
-
I think the issue is that since you are using the default OptOut mode in Audit Entity Framework, all entities will be audited by default. However, you want to exclude the One way to achieve this is by adding the using Audit.EntityFramework;
[AuditIgnore]
public class UserAudit: IAuditEntity
{
public required string Username { get; set; }
public required string FirstName { get; set; }
public required string LastName { get; set; }
} If that’s not the case, please share your configuration so I can provide further assistance. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on using audit.net to keep track of changes made while saving and updating the data. I have been successfully able to do that. But there is a problem with my solution. We have multiple entities which need to be tracked separately in different tables. I created the separate audit tables with the same columns as the main table. For example:
It has successfully worked in tracking the changes for the entity but this way has led to duplication when creating audit classes. As more entities will be added and the changes would be made, the maintenance will be become cumbersome. Is there a way to avoid this with Audit.net?
Beta Was this translation helpful? Give feedback.
All reactions