Shows how to override SaveChangesAsync in an Entity Framework Core DbContext to automatically publish MediatR notifications immediately after an entity is saved. The approach uses the ChangeTracker to identify saved Product entities and dispatches a notification for each, decoupling persistence logic from downstream reaction logic. Includes a seeder using Bogus and a working code example.
3 Impressions