Audit log (CrudEvent) without AutoQuery

Hi Mythz!

I not using auto query but I would like to use the audit log feature. My models contains who and when created, modified and deleted the record.

public DateTime CreatedDateTime { get; set; }
public int CreatedById { get; set; }

public DateTime? ModifiedDateTime { get; set; }
public int? ModifiedById { get; set; }

public DateTime? DeletedDateTime { get; set; }
public int? DeletedById { get; set; }

How can I insert record on the CrudEvent table when the model changed?
I am looking for a general solution to this problem. :slight_smile:


The Executable Audit Log only supports AutoQuery Crud requests.

Though you’ll still be able to inherit its AuditBase class where you’ll be able to use the WithAudit extension method to populate it, e.g:

Db.Insert(new Record { ... }.WithAudit(Request));

The WithAudit extension only fill the CreatedBy, CreatedDate, ModifiedBy , ModifiedDate properties. I would like to fill and query the CrudEvent table for the Audit log.

You can use the existing CrudEvent table but you’d need to populate it yourself, the auto populating feature is tied to AutoQuery CRUD.

Ok, thanks for your help.