Using triggers over multiple projects #132
-
Is it possible to use a trigger over projects? For example: If we update an entity in project A, is it possible to fire a trigger that lives sololy in project B? To my understanding, both instantiate a different instance of the dbcontext and therefore updates to the dbcontext will only fire a trigger that is hooked on the same db context. Just trying to understand a bit what is possible and how this could fit over projects. Am I right that this use case is not viable? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Any trigger regardless of where its code lives (ProjectA, ProjectB, a nuget package or even something dynamic) will be invoked when performing a Save operation for as long as those triggers are registered with the DbContext type (or with your current ServiceProvider). I'm not sure I understand this question so please feel free to clarify if the above does not help :) |
Beta Was this translation helpful? Give feedback.
Any trigger regardless of where its code lives (ProjectA, ProjectB, a nuget package or even something dynamic) will be invoked when performing a Save operation for as long as those triggers are registered with the DbContext type (or with your current ServiceProvider).
I'm not sure I understand this question so please feel free to clarify if the above does not help :)