AuditedAttribute class
namespace: Serenity.Data.Mapping assembly: Serenity.Net.Services
Indicates if the field is audited. For DataAuditLog, all fields are audited by default, but if the field has [Audited(false)] it will not be logged. With [Audited(KeepValues = false)], a change of the field is logged, but not its values, e.g. for a field whose values are private, like the ones named like a password or a secret, which are treated so anyway.
[AttributeUsage(AttributeTargets.Property)]
public class AuditedAttribute : Attribute
Public Members
| name | description |
|---|---|
| AuditedAttribute(…) | Indicates if the field is audited. For DataAuditLog, all fields are audited by default, but if the field has [Audited(false)] it will not be logged. With [Audited(KeepValues = false)], a change of the field is logged, but not its values, e.g. for a field whose values are private, like the ones named like a password or a secret, which are treated so anyway. |
| KeepValues { get; set; } | Gets or sets whether the old and the new values of a change of the field are kept, true by default. When false, only that the field changed is logged. |
| Value { get; } | Gets the value of the attribute. |
Remarks
Initializes a new instance of the attribute.
See Also
- Source: AuditedAttribute.cs