Prerequisites Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
What is your product version? Zero V9.1.0 the latest What is your product type (Angular or MVC)? Angular What is product framework type (.net framework or .net core)? .Net Core If issue related with ABP Framework What is ABP Framework version? Zero
Hi,
I am leveraging the predefined Events ("ing", "ed") to log when an entity is created and updated, now i need a 'get" event when an entity is retrieved from DB, i believe i can implement the event handler and GetEventData:EventData, for example and use EventBus.Trigger(new FnxEventData { Entity = individual }) in my GetIndividual method. is there any way that the GetIndividual will automatically trigger my "get" event just like the predefined Event triggered by Zero? I would prefer not to call EventBus.Trigger(new FnxEventData { Entity = individual }) in all my get methods. Thanks Laurie
1 Answer(s)
-
0
Hi @lweng567
This is not possible by default but you can override SaveChanges method (and async version) of your DbContext and implement it yourself similar to https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.EntityFrameworkCore/EntityFrameworkCore/AbpDbContext.cs#L221