AuditEvent class
namespace: Serenity.Extensions assembly: Serenity.Extensions
An entry of the audit log: something a user did, e.g. saved a record, signed in or exported a list, with the record it was done to and the changes of its fields. See IAuditLog.
public class AuditEvent
Public Members
| name | description |
|---|---|
| AuditEvent() | The default constructor. |
| Action { get; set; } | Gets or sets what was done, one of AuditActions, e.g. Update, or a code of the application's own. |
| Changes { get; set; } | Gets or sets the changes of the fields, of the record or of the detail records saved with it. |
| Data { get; set; } | Gets or sets more about it as JSON, e.g. the number of rows of an export. |
| DisplayName { get; set; } | Gets or sets the display name of the user who did it, kept as it was then. |
| EntityId { get; set; } | Gets or sets the ID of the record it was done to, in its invariant text. |
| EntityLabel { get; set; } | Gets or sets a label of the record as it was then, e.g. its name, so that it reads well after the record is renamed or deleted. |
| EntityType { get; set; } | Gets or sets the type of the record it was done to, the row identifier of its row, e.g. "Northwind.Order". |
| Failed { get; set; } | Gets or sets whether it failed, e.g. a sign-in with a wrong password. |
| IPAddress { get; set; } | Gets or sets the IP address it came from. The address of the current request is used when it is not set. |
| Method { get; set; } | Gets or sets how it was done, e.g. "Password" or "Microsoft" for a sign-in, or "xlsx" for an export. |
| Reason { get; set; } | Gets or sets why it was done or why it failed, e.g. the reason a sign-in failed, or a note of the user. |
| RequestId { get; set; } | Gets or sets the ID of the request it was done in, which relates the events of a request. The identifier of the current request is used when it is not set. |
| Time { get; set; } | Gets or sets when it happened, in UTC. The time of writing is used when it is not set. |
| UserAgent { get; set; } | Gets or sets the user agent it came from. The user agent of the current request is used when it is not set. |
| UserId { get; set; } | Gets or sets the ID of the user who did it, in its invariant text. The user of the current request is used when it, and Username, are not set. |
| Username { get; set; } | Gets or sets the username of the user who did it, kept as it was then. |
See Also
- Source: AuditEvent.cs