Class AuditedEntity
- Namespace
- Dynamicweb.Core
- Assembly
- Dynamicweb.Core.dll
The AuditedEntity class holds information about a given entity and when and by who it was audited
[Serializable]
public class AuditedEntity
- Inheritance
-
AuditedEntity
- Inherited Members
- Extension Methods
Constructors
AuditedEntity(DateTime, DateTime)
Initializes a new instance of the AuditedEntity class.
public AuditedEntity(DateTime created, DateTime updated)
Parameters
AuditedEntity(DateTime, string)
Initializes a new instance of the AuditedEntity class.
public AuditedEntity(DateTime created, string createdBy)
Parameters
created
DateTimeThe created date and time.
createdBy
stringThe user id of the user who created the entity.
AuditedEntity(DateTime, string, DateTime, string)
Initializes a new instance of the AuditedEntity class.
public AuditedEntity(DateTime created, string createdBy, DateTime updated, string updatedBy)
Parameters
created
DateTimeThe created date and time.
createdBy
stringThe user id of the user who created the entity.
updated
DateTimeThe updated date and time.
updatedBy
stringThe user id of the user who last updated the entity.
Properties
CreatedAt
Gets the created date and time of the entity.
public DateTime CreatedAt { get; }
Property Value
- DateTime
E.g.
2015/05/29 05:50:06
CreatedBy
Gets the user id of the user who created the entity.
public string CreatedBy { get; }
Property Value
DeletedAt
Gets the deleted date and time.
public DateTime? DeletedAt { get; }
Property Value
DeletedBy
Gets the user id of the user who deleted the entity.
public string? DeletedBy { get; }
Property Value
LastModifiedAt
Gets the last modified date and time.
public DateTime LastModifiedAt { get; }
Property Value
- DateTime
E.g.
2015/05/29 05:50:06
LastModifiedBy
Gets the user id of the user that last modified the entity.
public string LastModifiedBy { get; }
Property Value
Methods
MarkAsDeleted(DateTime, string)
Marks the entity as deleted.
public AuditedEntity MarkAsDeleted(DateTime deletedAt, string deletedBy)
Parameters
deletedAt
DateTimeThe deleted date and time.
deletedBy
stringThe user id of the user who deleted the entity.
Returns
- AuditedEntity
AuditedEntity.
MarkAsDeleted(string)
Marks the entity as deleted.
public AuditedEntity MarkAsDeleted(string deletedBy)
Parameters
deletedBy
stringThe user id of the user who deleted the entity.
Returns
- AuditedEntity
AuditedEntity.
MarkAsUpdated()
Marks as updated.
public AuditedEntity MarkAsUpdated()
Returns
- AuditedEntity
AuditedEntity.
MarkAsUpdated(string)
Marks the entity as updated.
public AuditedEntity MarkAsUpdated(string updatedBy)
Parameters
updatedBy
stringThe user id of the user who updated the entity.
Returns
- AuditedEntity
AuditedEntity.