I need to run code after all Actions in asp.net core.
Apparently, the answer is not to register a new middleware, as middlewares don't have access to the Action return value, they have access to the executed ActionResult
.
Apparently, the answer is not to define a new ActionFilter
, as I need to use it on every action.
So here is the question: How can I run code before and after every action in asp.net core, in a way that I have access to method input and output?