LinqToSql Plus UseAudit


Gets or sets if INSERTED and DELETED data from the database should be returned as AuditEntries.

List<AuditEntry> auditEntries = new List<AuditEntry>();

context.BulkSaveChanges(options =>
	options.UseAudit = true;
	options.BulkOperationExecuted = bulkOperation => auditEntries.AddRange(bulkOperation.AuditEntries);


Logging old values and new values is often useful to keep history of changes in the database or file.


Why enabling this option decreases the performance?

Enabling this option will require additional data to be returned from the database.

Prime Library