Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Needs ExcludeFromHistory property, for fields. #30

Open
BrianMinister opened this issue Nov 4, 2018 · 6 comments
Open

Comments

@BrianMinister
Copy link

When recording history, there are fields that I don't want their real data recorded in history. These are like Personal Identifying data, or passwords (even after being hashed).

Though making this an extension method that would work in the OnModelCreating call, it would also be nice to see it as an attribute for the model fields themselves.

[ExcludeFromHistory(ReplacementValue="")]

@BrianMinister BrianMinister changed the title Needs ExcludeFromHistory property, for fields. Enhancement: Needs ExcludeFromHistory property, for fields. Nov 4, 2018
@rigofunc
Copy link
Member

rigofunc commented Nov 4, 2018

Good idea, this is a real requirement. You can PR for this or I will done this in next release.

@BrianMinister
Copy link
Author

I don't know how much time I have to put into this. I'll see if I can work on this this week. Otherwise, Jan 2019.

@tohidazizi
Copy link

Thanks for the gr8 job. Can we also have a feature to exclude a whole DbSet? I really don't need history for all the entities.
It is actually would be nice to exclude "all" and then include whatever entities we need history for them.

@rigofunc
Copy link
Member

When release new version, this should be supported.

@BrianMinister
Copy link
Author

I started on this, then realized that Newtonsoft's library is being used.
So I am testing using their [JsonIgnore] attribute for the field level access.

I suspect that a whole model implementing this would cover the model, if the serialization code isn't ignoring these attributes.

@coolhome
Copy link

coolhome commented Apr 13, 2020

I had a case where i needed to exclude binary data, however a more advanced feature could be using a hash for the binary data instead of the difference.

I completely agree with an attribute for ExcludeFromHistory. This would be super easy to implement, anyone have a problem if I implement it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants