ASP.Net Core MVC (.Net 5.0) best practices for Audit Trail/Data Versioning

I am new to MVC design (and Core architecture) and I am looking for knowledge on best practices for creating record versioning. I would like to ensure the following:

  1. Soft Deletes - When a record is "deleted" it is actually just set to inactive (allowing for records to be retrieved).
  2. Record Versioning - When a record is updated, it is not overwritten, but, instead, flagged as not active and the newer record would take its place.

Does Core MVC provide functionality to manage this type of work flow? In a .Net Framework Web Form website, I could easily manage the update/deletes as I would write the SQL code directly. I realize I could do this in MVC, but I would prefer to use MVC's abstractions. This is especially true as, when I update a record, it is not just one table but multiple tables (with multiple relationships) that would be updated and need version control.

Thanks



Read more here: https://stackoverflow.com/questions/64939664/asp-net-core-mvc-net-5-0-best-practices-for-audit-trail-data-versioning

Content Attribution

This content was originally published by jason at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: