DEV Community

Discussion on: EF Core: How to implement basic Auditing on your Entities

Collapse
 
rickystam profile image
Ricky Stam • Edited

Hi Armin,

In my example I saved the name or email address of the current user only for auditing purposes. I don't expect to do queries based on CreatedBy or ModifiedBy columns. If you have a different use case where you want to actually do queries on these columns there is nothing stopping you from creating these columns as FKs to the Users Table and instead of the Name property you can save the UserId property of the currently logged in user. If you need help with anything you can DM me here or on Twitter.

Thanks,
Ricky