How To Track Entity Changes With EF Core | Audit Logging

Опубликовано: 01 Октябрь 2024
на канале: Milan Jovanović
27,780
1k

☄️ Master the Modular Monolith Architecture: https://bit.ly/3SXlzSt
📌 Accelerate your Clean Architecture skills: https://bit.ly/3PupkOJ
🚀 Support me on Patreon to access the source code:   / milanjovanovic  

Tracking entity changes can be cumbersome to implement. However, with EF Core there is an easy way to implement entity change tracking as a cross-cutting concern. In this, I'll show you how you can track changes on your entity, write the code for tracking changes once, and never have to worry about it again.

3 Ways To Create Middleware In ASP.NET Core
https://www.milanjovanovic.tech/blog/...

Join my weekly .NET newsletter:
https://www.milanjovanovic.tech

Subscribe for more:
https://www.youtube.com/c/MilanJovano...

Chapters
0:00 What is Auditing?
0:30 IAuditableEntity
2:30 Using EF interceptors for auditing
6:09 Configuring the interceptor
7:27 Auditing in action